r/processing • • May 19 '20

Interference Worm

167 Upvotes

7 comments sorted by

View all comments

5

u/jeykech May 19 '20

Great ! Can you explain your algorithm ? Thanx

1

u/marcedwards-bjango May 20 '20 edited May 20 '20

The source code has now been posted here, if you’re interested. The main idea is that there’s three separate animated diamond shapes, and their offsets get added together to move the Y coordinates of a line segment up.

In summary, the entire thing works like this:

  1. Trace along the worm line to create a Processing shape by moving across the row, then turn around and go back again, a bit lower.

  2. For each vertex that gets added to the shape, offset the Y position, based on three animated diamond shapes.