Topic: The Life and Death of a Star
For my midterm project I was inspired by planetary orbits and the forces that make up a galaxy. While I was looking at our own solar system for inspiration, I didn’t want to limit myself. Utilizing the concepts of oscillation learned in class, I was able to mimic elliptical orbits for several planets(ellipses) that I categorized under particles. Then, I wanted to replicate a black hole sucking the particles in itself. I applied gravitational forces and attraction to get this sketch:
But the challenge came when I had to integrate the two – orbits and attraction together to create a sketch. I tried to first call all the particles in the draw loop but that made strange objects appear simultaneously. I was able to fix this by setting up two functions and calling them on the draw loop. That’s how I got the objects to orbit when mouse isn’t pressed and to be sucked in when mouse is pressed.
It was really helpful to hear critiques during my presentation. I want to further improve my sketch by incorporating more interactive elements like having the blackhole increase in size when sucking in certain objects or manipulating the orbits of certain planets since I don’t have constraints on p5js.
Link to sketch: https://editor.p5js.org/jihwanshin96/sketches/qxI-HfGIN
Link to presentation: https://docs.google.com/presentation/d/1bPAoklxJha6gEeJqADsru1RmpAS3vR6W7ZY1D9AkBCM/edit?usp=sharing