Loading...
Logo
Processing Forum
Hi guys,
I was wondering, is there any method to retrieve a point(x,y,z) from a curve (alternatively bezier) at specified t parameter?
Copy code

  1. PVector[] points;

  2. void setup()
  3. {
  4.   size(500,500, P3D);
  5.   points= new PVector[4];
  6.   points[0] = new PVector(100,100);
  7.   points[1] = new PVector(100,300);
  8.   points[2] = new PVector(350,100);
  9.   points[3] = new PVector(300,400);
  10. }

  11. void draw()
  12. {
  13.   stroke(0);
  14.   noFill();
  15.   bezier(points[0].x, points[0].y, points[1].x, points[1].y, points[2].x, points[2].y, points[3].x, points[3].y);
  16. }

Replies(2)



try curvepoints in the reference pls