23 Topics
| |
Well we all have seen the common questions on creating squares and hollow squares out of asterisks in C++, but how about creating a program that prints out a circle in asterisks? Obviously this would look like an oval due to line adjustment, but it would be quite interesting to … | |
I need to check my code has all these requirements. The requirements for “main()” are: a. Use an object. b. Declare all required variables. c. Output user information. d. Input the radius 1 and radius 2 to be used to calculate the area of two circles. e. Use object Circle … | |
If you draw a series of close spaced shapes your eyes get fooled to see Moire patterns. Here is one example of this. | |
Hello i have a little problem with moving ball around screen, also i'm confused why i cannot put this variables `double x = 0, y = 16, muvx = 0, muvy = 0;` at the public class MainActivity to be local variables and also i don't know how to set … | |
Hi everyone, i need your help.. I want to draw a circle,square and rectangle on Jframe on a click of a button.. This program was asked in my test paper, i couldn't get it right though bt i wanna know what my mistake is.. Plz help me.. import javax.swing.*; import … | |
Write a Java application that prompts and reads a value representing the radius, of a circle, then prints the circle's circumference and area. I do not know where to start | |
import java.util.Scanner; import java.text.DecimalFormat; public class Main { public static void main(String[] args) { double radius; double circ; double area; radius = getRadius(); circ = calcCirc(); area = calcArea(); DecimalFormat fmt = new DecimalFormat ("0.##"); System.out.println("run \n " + "The circumference of the circle is \n" + circ + "The … | |
You can draw a number of shapes directly on the PyGame window, and then save the drawing to an image file. | |
If you draw shapes that are closely spaced and shifted, you can create interesting interference patterns, so called moire patterns. Here is an example using the Python module PyGame to do the drawing. | |
namespace play_stop { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button4_Click(object sender, EventArgs e) { timer1.Interval = 1000; timer1.Start(); Counter = 0; } public void circles() { Graphics g = panel1.CreateGraphics(); g.DrawEllipse( new Pen(Color.Red),panel1.Width / 2, panel1.Height / 2,75, 75); Graphics h = … | |
Hi there I'm making a project to show how some of algorithms work. Basically i needed to show some drawing pixel by pixel. I made the code below and tried to run it <script> function init() { var paper = Raphael(10, 50, 800, 600); var arr = []; var j … | |
Write a Python program that draws a circle with radius 50 pixels and centered at the center of the canvas. Give the canvas white background color and make it expand with its frame whenever the user resizes the frame. The program will respond to some mouse and keyboard events as … | |
Hello, I am currently working on a school project and ran into a little bit of trouble. Every time I compile the program I get 2 errors they are: cirlce.java:23: incompatible types found : java.io.IOException required: char letter = get.ioException(); ^ cirlce.java:37: possible loss of precision found : double required: … | |
| I made a creature composed of shapes in a Java Applet. I want to basically copy and paste the creature I made so I have say 7-8 copies on the same applet. but in different locations. Is there an easy way besides copying the entire code, and moving each coordinate … |
Hello again! I'm having trouble trying to double the value of my coordinates in my point. The object is to create a pair of eyes and their position is identified by clicking a point in the graphic window which would allocated the centre of the left eye, and the second … | |
I am trying to draw circle in the upper left corner of a graphics window, and then move that circle at a diagonal to the bottom right corner, and then bounce it back to the upper left, and so on until my loop is exhausted. I can't get my moving … | |
how to add circle marker on google map by giving latitude,longitude and radius in KM? | |
circle.h [code] // // circle.h // defines the functions to draw circle. // #ifndef CIRCLE_H #define CIRCLE_H #include <windows.h> typedef struct tagCircle { int x; int y; int radius; } Circle; /* set the window handle */ void SetWindowHandle(HWND); /* set pixel @parms int x xposition @parms int y yposition … | |
im' confuse with this function...how do i call one function so it can be used in another function?? [ICODE]#include <iostream> #include <cmath> using namespace std; double pi=3.1416; double getinput(); double distance(double,double,double,double); double radian(double); double circumferences(double); double area(double); double diameter(double); void displayresult(double,double,double,double); int main() { double x1,x2,y1,y2; double rad,perimeter,areas,dia; cout<<"Please enter … | |
Trying to find an easier way to write my code. I am using the graphics.py module. I will add the graphics program as an attachment for anyone who does not have it or doesn't know what I am talking about. The first program I made is archery. Just simple circles … | |
For homework, we have to find the time complexity class of certain algorithms and explain why it has that certain complexity class. So, I have a couple of questions: - Why is the first running time always so much longer than the ones after? (setting up the application or something??) … | |
Python programming can have its lighter moments. Here we use one of those moments to draw an optical illusion using the Tkinter canvas to draw a rectangle, some lines and circles. | |
I tried to create 10 random circles with random colors using windows forms. The problem am not able to restrict my program to draw only 10 circles.It goes on and on. [code] Timer t = new Timer(); t.Interval = 1; t.Start(); t.Tick += new EventHandler(DrawCircle); [/code] is there any way … |
The End.