Assignment no.10 BOUNCING BALL.!
- Raashi
- Nov 9, 2021
- 1 min read
Updated: Nov 19, 2021
After writing each and every code and variable and doing the math I finally manages to figure out why it wasn't working. I am not good at math and understanding the graphs and origin of the canvas. Therefore, I bought graph paper and sketched the ball on that and then tried to write the code. I am 2 weeks late for this assignment but in the end I learned so that is what I am happy about. I even tried to rotate the ball when it moves but I couldn't figure it out perfectly. When I was trying to change the canvas size the ball moves in repetition and created a friction like movement.
Not only this but I tried to change the color of the ball as rgb is 255,when it hits the wall every time but it changes the color every time I refresh the page.
https://editor.p5js.org/raashi13/full/jBusGlW2y
Comentarios