Shapes in Space
Similarities Among All 3 Implementations
- You can navigate in the 3D space
- When shapes collide they make a clicking sound
- Each shape is assigned a random song
- The shape's song gets louder as you get closer to that shape and softer as you move away from that shape
- To keep the shapes in the frame, I implemented a bounding box
Shapes in 3D Space
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.
Spheres in Space with Gravitational Force
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.
The Lives of Shapes in an Imaginary 3D World
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.