Move an ellipse

I was wondering how I would make an ellipse continuously move down a x axis while maintaining it’s Y position, in better terms I am trying to make an ellipse start at one end of the canvas and continue down to the other side while spawning a new ellipse that is the exact same and movement pattern every 50 or so pixels apart from each other

Hello!
It would more efficient it you post code of what you have so far. Then we can gauge what your level is and reply accordingly.
:nerd_face:

It depends on your skill level.
First, for animation you need a setup and draw structure. See here, topic Hello mouse: https://processing.org/tutorials/overview/

Now to display an ellipse you say ellipse (80,90,10,15);

To animate it, replace 80 by x and add something to it in draw so it moves. Use background (0); as first line in draw.

See the examples section: https://processing.org/examples/linear.html


Now once you got this working. Save the sketch. Then save the sketch again with a new name. Because for multiple ellipses its more complicate.

For example look at Intlist in the reference to store multiple different x values (-10,-60,-110…) in setup(). Then look at for loop to loop over it and display the ellipses.

1 Like