Concept
sandworm – circle – sin/cos wave
I begin with wanting to create a sandworm-looking creature from Dune. During my research, I found out this B&W worm that is visually more appealing than a big yellow worm hiding in the desert.
After the initial brainstorm, I started playing around with circle() & ellipse() just to experiment with the for loop. This snippet I got from one of the readings inspired me to show more of the liveness of the basic shapes.
Keeping the shape of the sandworm and the potential movement they might have in mind, I decided to create a wave. With the help of this Youtube tutorial on sin & cos wave, i was able to create a normal wave. By adding framecount into that, I create the illusion as if this sandworm is 3D. To practice using if statement, I added a colorful background that is only triggered when your mouse is moved there.
Somehow Casey Reas came in mind, so I decided to explore a bit further. For the clarity of my worm, I removed the background interaction and replaced all cos with tan. Thi si the final result:
Code & future improvement
I am happy with how the frameCount came in handy in both the fill() & circle. In future, I would give more meaning to the background.
for (i=0; i<width+100; i=i+1){ fill( 178+177*cos(i/2 +frameCount/2) ); circle(i, height/2 + 100 * cos(i/100+frameCount/20), 50 * cos(i/30 + frameCount/50)) }