# Conditions to make a circle grow and shrink

**URL:** <https://discourse.processing.org/t/conditions-to-make-a-circle-grow-and-shrink/43698>\
**Category:** Beginners\
**Created:** [January 15, 2024, 9:42pm UTC](https://discourse.processing.org/t/conditions-to-make-a-circle-grow-and-shrink/43698 "2024-01-15T21:42:28Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 15, 2024, 10:19pm UTC](https://discourse.processing.org/t/conditions-to-make-a-circle-grow-and-shrink/43698/4 "2024-01-15T22:19:41Z")

</div>

Why are you re-declaring global variable _diam_ as a local variable in **draw()**?

And in the same vein, why _growth_ is a local variable in **draw()**?

Both _diam_ & _growth_ need to be global variables, so their current value is remembered while **draw()** is called back during the sketch execution.

---

_[View the full topic](https://discourse.processing.org/t/conditions-to-make-a-circle-grow-and-shrink/43698)._
