Posts

Showing posts from July, 2023

Functions

Image
 Using Functions I used function on top of another function to create this structure. First, this function is for creating spheres with random translate and scale values. Continuation of the above function. Adjust the translate and scale values with random numbers. This function is for creating shaders of the spheres. I put on the color orange and blue to the spheres. This is the function to complete the structure and connecting the spheres and pipes together. At the end, I created 100 spheres so that the sturcture looks like that in the image.

The Golden Angle

Image
 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 ...

4-Wheel Car

 Animating a Car In this practice, I was able to animate the wheels in expression editor. The wheels are moving back and forth along the z axis using sine function. There are also squash deformers so that the wheels are moving in a funny way.