Need moving balls on my curves
in
Programming Questions
•
9 months ago
Hi, forum,
I need help with moving balls on a bezier curve.
Taking the example from processing site itself. ( http://processing.org/learning/curves/) I need them red dots/ellipses(the end points to move along the curve from one end point to the other). I know you can do that on spline curves but what about bezier curves
Taking the example from processing site itself. ( http://processing.org/learning/curves/) I need them red dots/ellipses(the end points to move along the curve from one end point to the other). I know you can do that on spline curves but what about bezier curves
NOTE: the curve is presently on an background image, so be careful of that.
- void setup( )
- { size(150, 150);
- background(255);
- smooth();
- ellipse(50, 75, 5, 5); // endpoints of curve <-- i want these ellipses to keep moving on the curve
- ellipse(100, 75, 5, 5);
- fill(255, 0, 0);
- ellipse(25, 25, 5, 5); // control points
- ellipse(125, 25, 5, 5);
- noFill();
- stroke(0);
- bezier(50, 75, 25, 25, 125, 25, 100, 75); }
1