Question on Bezier curve in 2D

Triathlon

New member
Joined
Apr 27, 2022
Messages
3
Hi,
I'm in 2D, and I have a Bézier curve defined by three points A, B, C.
I have two other points next to the curve, D and E, and I want to make a second Bézier curve C, D, E (having a common point (C) with the first curve).
My question is : How do I calculate the coordinates of point D to make the second curve continuous (tangent) with the first one.

I know that there are infinite possibilities to position point D to have the second curve continuous with the first one. So, I assume that I can choose an x value for D, and calculate its y value.

Thanks

Capture.PNG
 
Since you define your curves by 3 points I am assuming that you are using quadratic Bezier curves (https://en.wikipedia.org/wiki/Bézier_curve#Quadratic_Bézier_curves). For Bezier curves the tangent at the end point is colinear with the direction to the nearest control point. In your case this means that for the two curves to be tangential points B,C and D must lie on a straight line. Hope this answers your question.
 
It looks so easy, but still I couldn't see that on my own. Now I blame myself for that ?.

Thank you so much.
 
It looks so easy, but still I couldn't see that on my own. Now I blame myself for that ?.

Thank you so much.
You are welcome. Blaming makes no sense to me -- getting stuck/unstuck is an integral part of the learning process, at least in my experience.
 
Top