I want to create a smooth curve that starts at point $P_0 = (Px_0, Py_0)$ with normalized tangent $T_0 = (Tx_0, Ty_0)$ (where $\sqrt{Tx_0^2 + Ty_0^2} = 1$) and with curvature $κ_0$ (where positive values are in the opposite direction relative to the normal and negative values are in the same direction as the normal), and which ends at point $P_1 = (Px_1, Py_1)$ with normalized tangent $T_1 = (Tx_1, Ty_1)$ and with curvature $κ_1$. That is, a parametric curve $P(t)$ where
- $P(0) = P_0 = (Px_0, Py_0)$
- $P(1) = P_1 = (Px_1, Py_1)$
- $κ(0) = κ_0$
- $κ(1) = κ_1$
- $T(0) = T_0 = (Tx_0, Ty_0)$ where $\sqrt{Tx_0^2 + Ty_0^2} = 1$
- $T(1) = T_1 = (Tx_1, Ty_1)$ where $\sqrt{Tx_1^2 + Ty_1^2} = 1$
Note that curvature is calculated as $κ(t) = \frac{Px'(t) Py''(t) - Px''(t) Py'(t)}{\left(\sqrt{Px'(t)^2 + Py'(t)^2}\right)^3}$, while the normalized tangent vector is calculated as $T(t) = \frac{P'(t)}{\sqrt{Px'(t)^2 + Py'(t)^2}}$.
The video "The Continuity of Splines" by Freya Holmér implies that one approach to creating my desired curve is to put together a polynomial equation of degree five, with six unknown variables to go with the six constraints, giving $P(t) = a × t^5 + b × t^4 + c × t^3 + d × t^2 + e × t + f$. To have $P(0) = P_0$, it is easy to see that the variable $f$ must be $P_0$, giving $P(t) = a × t^5 + b × t^4 + c × t^3 + d × t^2 + e × t + P_0$.
However, I can't figure out how to find the values of the other five variables given the constraints I have. The definitions for the curvature and tangent seem to be too complicated to plug in nicely. Can this be done? Is there an easy way that I'm missing, is it tricky but doable, or is it actually impossible?