Inspiration
Vector from Despicable Me
What it does
It uses the rocket launch game and creates a moon that the rocket goes to and blows up.
How we built it
We used the code from the rocket launch game and then added a moon, which we made the rocket fly to by getting the angle the rocket flies to and using that to change the line the rocket moves along so it would collide with the moon. Once it gets to the moon, the rocket is moved way off-screen, and the program generates ellipses that are made larger every generation.
Challenges we ran into
Calculating the angle at which the rocket must launch to collide with the moon was difficult because the background pixel grid was flipped compared to graphs that we would normally work with, with a height equal to 0 at the base of the image.
Accomplishments that we're proud of
Doing the math to find the angle at which the rocket launches
What we learned
How to use the built-in math library for Python, how to understand the variables we are working with, and how to make changes to them in order to apply them to known math theorems.
What's next for Vector's Plan B
We wanted to add some variation to the rocket launch so that it might miss.
Built With
- p5
- python
Log in or sign up for Devpost to join the conversation.