Place control point for Bezier curve

I am creating a plugin where a user is able to create rollercoaster track using Bezier curves.
I am currently experimenting with quadratic curves, but I can use cubic if it’s possible.
The problem I’ve been having is that the user will set the orientation of the startpoint and endpoint. I need to place the other control point such that the curve matches the two orientations.
So far I am wondering if using the right-angled triangle between the two endpoints is the solution, by placing the control point on the triangle’s right-angle vertex.

Any ideas - let me know. Thanks in advance.

1 Like