For two joined bezier curves to be continuous (i.e. no corners or abrupt slope changes), the control points on each side of the joining point must be colinear. This behavior is default in vector editing programs like Adobe Illustrator.

An example in Processing:

// BezierJoins.pde
// Marius Watz - http://workshop.evolutionzone.com

void setup() {
  size(400,400);
}

void draw() {
  background(200);
  noFill();

  float xD=width/2-mouseX;
  float yD=height/2-mouseY;  

  bezier(0,0,
    300,100,
    width/2-xD,height/2-yD,
    width/2,height/2);

  bezier(width/2,height/2,
    width/2+xD,height/2+yD,
    400,300,
    400,400);
}

There is one comment to "Code: Continuous bezier joins". You may leave your own comment.
1. Walter, April 27th, 2007 at 15:06

based on this i created smooth camera motion along a path, works really great!

Comment on this entry

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>