Quote:
Originally Posted by theNerd
what if the current heading angle was a slope of infinity?
|
Pick a coordinate system whose origin is the starting point and whose positive X axis aligns with the starting direction of motion.
Compute the ending point (X
2,Y
2) and slope m
2 in that coordinate system.
Then the cubic becomes simply Y = aX
3 + bX
2
and the formulas for a and b are simply
a = (m
2X
2 - 2Y
2)/X
23
b = (3Y
2 - m
2X
2)/X
22