# How to manipulate the size of the ellipse when it is located toward the center of the screen?

**URL:** <https://discourse.processing.org/t/how-to-manipulate-the-size-of-the-ellipse-when-it-is-located-toward-the-center-of-the-screen/35852>\
**Category:** Beginners\
**Tags:** homework\
**Created:** [March 20, 2022, 7:50am UTC](https://discourse.processing.org/t/how-to-manipulate-the-size-of-the-ellipse-when-it-is-located-toward-the-center-of-the-screen/35852 "2022-03-20T07:50:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 20, 2022, 7:55am UTC](https://discourse.processing.org/t/how-to-manipulate-the-size-of-the-ellipse-when-it-is-located-toward-the-center-of-the-screen/35852/2 "2022-03-20T07:55:09Z")

</div>

See

> [@How to make the ellipse size change when the ellipse locates toward the center??](https://discourse.processing.org/t/how-to-make-the-ellipse-size-change-when-the-ellipse-locates-toward-the-center/35805/3):
>
> You can calculate the distance to the center with float d=dist(x,y,width/2,height/2); and then use map() command float diam = map(d,0,width,1,55); use diam as 3rd and 4th parameters for ellipse

---

_[View the full topic](https://discourse.processing.org/t/how-to-manipulate-the-size-of-the-ellipse-when-it-is-located-toward-the-center-of-the-screen/35852)._
