For this week’s assignment, I utilized basic p5.js shapes, transformations, and vector math to create a bouncing sandwich.
I started by creating a bouncing shining ball we learned in class. Imitating real-world physics through coding is very interesting for me, so I decided to make something similar.
After creating the used rectangle, I play with different parameters to present the real trampoline effect as much as possible. However, if I decrease the speed when the sandwich is bouncing back, it will bounce back higher and higher and finally disappear on the screen with time passing by.