I have two point $p_1$ and $p_2$. The velocity vectors are $v_1$ and $v_2$ respectively. The length of the velocity vectors are constant.
I want to draw a path from $p_1$ to $p_2$ that enters $p_1$ with velocity $v_1$ and exits $p_2$ with velocity $v_2$. I have functions for quadric and cubic splines to my disposal.
How do I calculate the intermediate points (one or two)?
These points are part of a longer path, but I only know these two points at this time. I cannot wait until I know all the points until I draw the path.
You want a cubic Bézier curve with control points $p_1$, $p_1+\frac13v_1$, $p_2-\frac13v_2$, and $p_2$.
Note that this is parametrized with $t\in[0,1]$, so the “time” taken between the end points is $1$, and the velocities $v_1$ and $v_2$ are assumed to be scaled correspondingly. If this assumption is wrong, replace the two factors $\frac13$ with appropriately scaled factors. (The factor $\frac13$ is due to the coefficients $3$ in the expression for the derivative of the cubic Bézier, as you find it on the linked Wikiepedia article.)