NOC – Week 6: Forces pt. 2 – Katie Pellegrino

Assignment 6

Link to Assignment
Inspiration:

For this assignment, I created what might be the foundation for my midterm constellation project. This project is inspired, and based heavily on, Dynamic Constellations, by Diego Garcia. Following his code, along with referencing our code from class and from Nature of Code examples, was extremely helpful to better understanding gravitational attraction along with how to draw lines between different particles.

constellation

Concept:

Essentially, this sketch draws a particle whenever the user clicks on the screen. Each particle uses gravitational attraction to attract each other and has various randomized masses. Once the particles are within a certain distance of each other, a line is drawn between them. 

Additionally, I added a collision detection function which highlights the particles when they overlap, or ‘collide.’ 

Ideas:

For my midterm project, I really hope to work with building a constellation-like atmosphere and visual. This first step really helped me to understand some of the fundamental methods that will need to be implemented in my midterm project, however, further concepts that I’d like to explore include expansion into the 3D, not only providing collision detection but also preventing collisions, and possibly using oscillations to manipulate a smooth size change in the particles.