Pregunta

hey everyone i have a processing.js project where i am suppose to make my initials that have been drawn with code display in the window.... i created the document and built all the commands that i want it to do, however what i did was just use some ellipses to execute the commands that i was programming....now how ever i cannot get my letters to animate and behave in the same way the ellipses did, can anyone show me what the problem is. im sorry im new to processing and im trying to teach myself

¿Fue útil?

Solución

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 beziers in Processing. If not then please go read the documentation first and see if you can figure it out.

Compare ellipses with beziers in Processing. ellipses 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 (lines have two x values and two y values). Now if you understand that logic then moving beziers should be a walk in the park seeing that all you have to do is change all the x and y values.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top