Inspiration
I have always loved space and galaxies so when I saw a chance to make art from code and follow a tutorial; so using galaxies as a template was a no brainer
What it does
This app allows you to move a slider that will offset the rotation of galaxy arms making different shapes of galaxies.
How we built it
To build this I use p5js and modified this tutorial
Challenges we ran into
The tutorial only uses white for the particles so I had to figure out how to change between three colors randomly and ended up using a color array taking the modulus of the index of the start to get a value between 0-2 then using a random function on the theta of the stars to randomize it.
Accomplishments that we're proud of
This is my first use of p5.js and I am proud I could make something that has always interested me.
What we learned
p5.js and loads about particles
What's next for GalaxyCodeArt
Comet visualization, blackhole visualization, and more!!
Built With
- p5.js
- repl.it
Log in or sign up for Devpost to join the conversation.