noob question
in
Programming Questions
•
6 months ago
hey guys
i hope someone can help me with this tiny piece of code.
my aim is to draw an ellipse at middle of the screen, trace a oblique line between the border of the canvas and the ellipse and then repeat the process by drawing another ellipse a bit further and tracing another oblique line...
this is my code until now.. can u tell me what am i doing wrong?
i hope someone can help me with this tiny piece of code.
my aim is to draw an ellipse at middle of the screen, trace a oblique line between the border of the canvas and the ellipse and then repeat the process by drawing another ellipse a bit further and tracing another oblique line...
this is my code until now.. can u tell me what am i doing wrong?
- int destX, destY, h, point_x, point_y;
- void setup(){
- size (200,200);
- destX = width/2;
- destY = height/2;
- h = height - destY;
- point_x = destX - h;
- point_y = height;
- frameRate(20);
- }
- void draw (){
- fill(0);
- for (int x=width/2; x<width; x=x+7){
- ellipse(x, height/2, 4,4);
- }
- ellipse(point_x, point_y, 4,4);
- point_x++;
- point_y--;
- }
1