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:
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.
For each vertex that gets added to the shape, offset the Y position, based on three animated diamond shapes.
2
u/mr_pablo May 19 '20
Would love to know how you achieved the chromatic aberration!
3
u/marcedwards-bjango May 20 '20
That’s just three copies of the line, all offset a bit by time. I’m using
blendMode(SCREEN)and the three copies are#ff0000,#00ff00, and#0000ffrespectively. The result is a very similar effect to chromatic aberration, but it’s a lot simpler.I’ve just posted a link to the source code above, if you’re interested.
1
4
u/marcedwards-bjango May 20 '20
Here’s the source code, for anyone interested: https://gist.github.com/marcedwards/27dc15d2dee273878d1186ca0e5bf383
It’s a bit of a mess, but… eh, does the trick. :D