Shapes in 3D Space from Nataly on Vimeo. |
In this video, I programmed the shapes to start off as spheres, and change into a random shape upon collision. I did not implement a restriction on how close the shapes can get to each other, however, the shapes do go in the opposite direction when they collide; every shape moves in a random direction for a limited distance.
|
I implemented gravitational force in this version and handled collisions differently. In this program, when the spheres collide they have a limit as to how close they can get to each other, and so that collisions look correct, the shapes remain as spheres. This is a more physically correct implementation, as the one in part one is all random.
|
This one, was the fun one. I decided to make a world in which all the shapes start off as "babies" and they grow up over time. Like in our world, each sphere is randomly assigned a maximum adult size within a range, so some may grow to be bigger than others. In addition to the clicking sound, the objects get a new random color and shape upon collision. The shape's song is softer the smaller they are, and it gets louder as they grow; I created this effect by increasing the amplitude over time. There is also a small and random chance of the shape "dying" and being sent back to its baby form and the process of growing starts all over again.
|