WhiteHole

Java

WhiteHole is an extensive program designed to simulate the effect of gravity on particles moving through space. The colored circles called planets spawn randomly and the smaller, more common white circles are called particles and start by default. Both respawn whenever they are absorbed by the central WhiteHole. Originally I struggled to create a convincing simulation of gravity but I visited one of my old projects GravityPoints and used the gravity I had learned from programming that in this simulation. It worked even better then with gravity points as well which was amazing, but it was a simple equation that wasn’t quite accurate. My friend learned about this and wanted to figure out the correct way to simulate gravity using trigonometry. We struggled for a couple weeks but eventually figured it out as well as a couple other methods of showing gravity while messing with my code. I decided to create settings to let the user decide between these different types of gravity and see how they interact. This also lead to me adding many more functions within the settings like controlling the particle number, turning planets on and off, controlling the WhiteHole size as well as turning off its growth or absorption.