# Animating simple motion of line with clean fade not overwriting with background(0)

**URL:** <https://discourse.processing.org/t/animating-simple-motion-of-line-with-clean-fade-not-overwriting-with-background-0/5823>\
**Category:** Beginners\
**Created:** [November 22, 2018, 8:57am UTC](https://discourse.processing.org/t/animating-simple-motion-of-line-with-clean-fade-not-overwriting-with-background-0/5823 "2018-11-22T08:57:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [November 22, 2018, 9:15am UTC](https://discourse.processing.org/t/animating-simple-motion-of-line-with-clean-fade-not-overwriting-with-background-0/5823/2 "2018-11-22T09:15:07Z")

</div>

> [@gabecolors](#):
>
> The clear background technique to make most of the examples work seems like a shortcut

It is not a shortcut, this is how almost every animation works.

You start by cleaning everything you have on your screen at the begining of draw() with

```auto
background(color);

```

Then you update the position of your objects.  
Then you draw your objects (at their new position).

I remember there was a thread quite similar to what you are asking. I’ll have a look and paste it here.

Edit:  
This is the thread: [Draw lines that go from bottom to top? - #4 by jb4x](https://discourse.processing.org/t/draw-lines-that-go-from-bottom-to-top/5466/4)

---

_[View the full topic](https://discourse.processing.org/t/animating-simple-motion-of-line-with-clean-fade-not-overwriting-with-background-0/5823)._
