You are doing fine with the animation of the ball (I would tweak some values to make the bounce more realistic but that's up to you to figure out) but for some reason you are stumped when it comes to moving the shape you created.
I am assuming you were able to create the shape because you're familiar with the documentation of bezier
s in Processing. If not then please go read the documentation first and see if you can figure it out.
Compare ellipse
s with bezier
s in Processing. ellipse
s have an x
and a y
. You understood that correctly. To move an ellipse
you have to change the value of x
and y
. I hope you can understand that same logic applies elsewhere. To move a rect
you have to change its x
and y
, etc. To move a line
is the same way. Change all x
and y
values (line
s have two x
values and two y
values). Now if you understand that logic then moving bezier
s should be a walk in the park seeing that all you have to do is change all the x
and y
values.