# Progress bar from inside draw()

**URL:** https://discourse.processing.org/t/progress-bar-from-inside-draw/12091
**Category:** Coding Questions
**Created:** [June 16, 2019, 9:14am UTC](https://discourse.processing.org/t/progress-bar-from-inside-draw/12091 "2019-06-16T09:14:40Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![toby](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/toby/32/5434_2.png) [@toby](https://discourse.processing.org/u/toby)
#### Post date: [June 16, 2019, 3:26pm UTC](https://discourse.processing.org/t/progress-bar-from-inside-draw/12091/5 "2019-06-16T15:26:36Z")

</div>

Good question kll! I’m rendering fractals at 4K x 4K pixels, iterating on each pixel up to 500 times using functions from the [Apache complex library]([https://commons.apache.org/proper/commons-math/userguide/complex.html](https://commons.apache.org/proper/commons-math/userguide/complex.html). So it’s common to have a single draw() taking up to 5 minutes. The program renders previews at 512x512 in real time, and then when it’s time to render one you like, you press the Render button and go and have a cup of tea. So that’s where the progress bar comes in. Example attached.

 ![160619-000627](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7577deb68438d1315f1ce2877094bde9d9bfb59c.jpeg)

---

_[View the full topic](https://discourse.processing.org/t/progress-bar-from-inside-draw/12091)._
