3

i have two bezier curves placed at a distance apart in space. curve 1 has control points A0, A1,A2, A3. A0 and A3 lie on curve and are its end points Curve 2 has control points C0,C1, C2, C3 . C0 and C3 lie on curve.and are its end points

i want to join the two curves A and C with an intermediate bezier curve B. the intermediate Curve B has control points A3 and C0 which lie on the curve and are its end points. the intermediate control points B1 and B2 are unknown to me. also the joining should be smooth enough. please help as to how to proceed. have read alot about beziers but dont know how to do this. thanks and regards, Gauri

gauri2180
  • 41
  • 1
  • 2
  • If Arty answered your question, feel free to click on the check mark next to his answer to accept it. – LarsTech Jan 25 '12 at 15:11
  • Here is a [html5 tutorial](http://html5tutorial.com/how-to-join-two-bezier-curves-with-the-canvas-api/) that explain in detail how to join 2 bezier curves. – Alex Apr 04 '12 at 10:54

2 Answers2

4

B1 will be: B1x = 2 * A3x - A2x; B1y = 2 * A3y - A2y;

B2 will be: B2x = 2 * C0x - C1x; B2y = 2 * C0y - C1y;

This should give you perfectly smooth join.

Arty
  • 723
  • 5
  • 10
2

@Arty

You are correct but this will only assure a "smooth enough" join.

To achieve a better looking join of those 2 curves you must also have 2nd derivative equals at the junction points. I place this here for those that might need this piece of information.

Alex
  • 5,510
  • 8
  • 35
  • 54
  • You right, the word 'perfect' was not correct here. But equalizing 2nd derivatives would require to build the whole curve differently, as not only you have to match n+/-1 control points, but n+/-2 as well. – Arty Mar 20 '12 at 07:45