Learn creative coding writing simple programs

79. A spinning star becomes a plant

This is the third time we modify our 3D rotating cube. The first time it contained floating points. The second version contained lines pointing from the center in many different directions. It looked like a star. This third version uses bezier curves, and hopefully it looks a little bit like a plant. All our curves begin at the bottom of the cube, right in the middle of the floor, and they all continue straight up because the first control point is at the middle of the ceiling of the cube. The end point is somewhere random inside the cube. To simplify things, we avoid thinking of an original second control point for each curve. We just reuse the end point as second control point.
Don't worry if you don't understand yet the X, Y and Z axes, it can be confusing at the beginning. We will study them with more detail in the future.

Tags: 3D, rotate, animate

Code editor

You can make changes to the code below. Then
Below you can ask and answer questions related to this video. If your question is unrelated to the video, please post it at the Processing Forum as I'm unable to help with all of your programs and still have enough free time to eat and sleep :)
comments powered by Disqus