Assume you have a flat plane, with a bicycle resting on it. As the bicycle enters a turn, it leans into the turn with angle theta. At the same tim开发者_开发技巧e, the bike frame points in the same direction as the bike velocity.
Thus, given the bike velocity vector v (assumed to be in the XZ plane) and the lean angle theta, how can you find the rotation matrix for the bike?
Use a quaternion. Axis is bike velocity and 'lean into turn' is axis angle. Then convert to rotation matrix
精彩评论