# Move an ellipse

**URL:** <https://discourse.processing.org/t/move-an-ellipse/18717>\
**Category:** Coding Questions\
**Created:** [March 16, 2020, 10:12pm UTC](https://discourse.processing.org/t/move-an-ellipse/18717 "2020-03-16T22:12:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NotConsumable](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@NotConsumable](https://discourse.processing.org/u/NotConsumable)\
**Post date:** [March 16, 2020, 10:12pm UTC](https://discourse.processing.org/t/move-an-ellipse/18717/1 "2020-03-16T22:12:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![debxyz](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@debxyz](https://discourse.processing.org/u/debxyz)\
**Post date:** [March 17, 2020, 1:10am UTC](https://discourse.processing.org/t/move-an-ellipse/18717/2 "2020-03-17T01:10:43Z")

</div>

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.  
🤓

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [March 17, 2020, 6:54am UTC](https://discourse.processing.org/t/move-an-ellipse/18717/3 "2020-03-17T06:54:31Z")

</div>

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/](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](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.
