- Other approach: ArcBall/Trackball behavior
-
- 3 dof: left/right, top/down, but also twist
- Idea: Use the 2D cursor position as "3D point on the trackball"
-
- Motion between 2 cursor positions = 3D Rotation applied to the ball
-
- Algorithm:
-
- Inputs \(p_1=(p_{1x},p_{1y})\), \(p_2=(p_{2x},p_{2y})\) in screen coord.
- \(q_{1/2}\) = ArcBallProjection\((p_{1/2})\)
- \(R\)= rotation between vectors \((q_1,q_2)\)
-
- ArcBallProjection(p)
- \(d=\)norm(p)
- if(d<\(1/\sqrt{2}\))
-
- else // hyperbola
-
- return q
- Note: the hyperbola smoothly extends the sphere in the entire screen.