The Golden Angle
Playing with the Golden Angle
This week we are using the function of creating spheres to form a pattern. The golden angle in the sine and cosine function can wavy pattern in a circle.
In my this scene, there are 2000 spheres in total. Implementing "cmds.setAttr(obj[0] + ".tx", math.sin(goldenAngle)*math.sqrt(i))" and "cmds.setAttr(obj[0] + ".tz", math.cos(goldenAngle)*math.sqrt(i))" makes the translate x and z moves from the previous point when creating a new sphere. There is an additional line of code "cmds.setAttr(obj[0] + ".ty", math.sin(goldenAngle)*10*math.pi)". It makes the spheres go up and down in the y translation. In my script, I added an if statement within the loop. If the count is more than 1/3 of the total repeat the same code but not the "translate y". This makes a tornado shape. The points of each tornado are the starting points, and the sphere creates in a pattern that goes up or down gradually.
It is a fun experience playing with the value of golden angle. I would love to try and experiment more with it.
Comments
Post a Comment