# Drawn shapes stay after frame they were drawn?

**URL:** <https://discourse.processing.org/t/drawn-shapes-stay-after-frame-they-were-drawn/11080>\
**Category:** Beginners\
**Created:** [May 9, 2019, 6:59pm UTC](https://discourse.processing.org/t/drawn-shapes-stay-after-frame-they-were-drawn/11080 "2019-05-09T18:59:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DerekCresswell](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/derekcresswell/32/4868_2.png) [@DerekCresswell](https://discourse.processing.org/u/DerekCresswell)\
**Post date:** [May 9, 2019, 6:59pm UTC](https://discourse.processing.org/t/drawn-shapes-stay-after-frame-they-were-drawn/11080/1 "2019-05-09T18:59:32Z")

</div>

I know this is really stupid. Why are shapes staying on screen even if they weren’t drawn this frame? This hasn’t happened on my other projects.  
Basically my shapes are leaving trails of themselves.

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [May 9, 2019, 7:16pm UTC](https://discourse.processing.org/t/drawn-shapes-stay-after-frame-they-were-drawn/11080/2 "2019-05-09T19:16:36Z")

</div>

When you draw something on a new frame, you are not starting from scratch. The value of the pixels stays the same.

To get rid of the trail, you need to clear your previous frame at the beginning of each frame by calling `background(0)` for example.

---

<div class="post-metadata">

**Author:** ![DerekCresswell](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/derekcresswell/32/4868_2.png) [@DerekCresswell](https://discourse.processing.org/u/DerekCresswell)\
**Post date:** [May 9, 2019, 7:49pm UTC](https://discourse.processing.org/t/drawn-shapes-stay-after-frame-they-were-drawn/11080/3 "2019-05-09T19:49:50Z")

</div>

Ah that is what’s different from my other projects, a small thing but big difference.  
Thanks!
