I have 2 points on a path (x1, y1) and (x2, y2). Both points has an angle value in degrees (a1 and a2 respectively). These are the angles that a curve intersecting these points must make with the y-axis when it intersects the associated (x, y) value.
For example, a curve that intersects points (x1, y1) and (x2, y2), must have a trajectory of a1 degrees at the point (x1, y1), and also a trajectory of a2 degrees at the points (x2, y2).
I wish to write a function that finds a curve that complies to the above scenario, but don't know where to start. Any help at all would be appreciated.
You can use a bezier to create the curve you want. The control points define the curve tangent at the start and end points. Thus to set the angle at the start and end just define the control points to be along the angles.
The data
Get the length of the line
Get the vectors for the angles and extend to about 1/3rd the
len
Then draw
Note that the angles must be in the same approx directions. If not the curve will go past the end point and then come back.