Smoothing

Something else I forgot to post from back in July: Simon explaining linear smoothing and exponential smoothing.

You can play with Simon’s smoothing sketch at https://editor.p5js.org/simontiger/sketches/ABdeWZVvs

The white circle is just the raw mouse movement. The blue circle is with linear smoothing, which means it goes at a fixed speed towards the mouse. The red circle is with exponential smoothing, which means it goes a fixed percentage of the way towards the mouse each frame. So the blue one just abruptly stops, and the red one slows down and stops.

The motion of the red one is a lot prettier, but nonetheless the math for it is also a lot simpler:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s