computer graphics course 2006
play

Computer Graphics Course 2006 Arcball user interface Arcball user - PowerPoint PPT Presentation

Computer Graphics Course 2006 Arcball user interface Arcball user interface When viewing a 3D model on the computer screen, often we would like to view it from a different side. How can we create an intuitive user interface for that


  1. Computer Graphics Course 2006 Arcball user interface

  2. Arcball user interface � When viewing a 3D model on the computer screen, often we would like to view it from a different side. How can we create an intuitive user interface for that purpose? � Arcball user interface lets us rotate (also move) 3D objects using the mouse, in a way such as if we were holding a crystal ball in our hands containing our model. Mouse click is holding a point on that crystal ball and mouse movement moves that point and thus rotates the ball.

  3. Arcball user interface � The virtual ball center is positioned in the center of the screen (therefore half of the ball lies outside the screen). Any mouse click on top the circle of intersection between the ball and the screens plane will define a point on top the outer side of the ball.

  4. Arcball user interface � The mathematical definition of that mapping would be: ⎧ + > ⎪ 2 2 ( , , 0 ) in case x x y y R � ⎨ ( , ) x y ⎪ − − 2 2 2 ⎩ ( x , y , R x y ) otherwise Whereas : (x, y) are screen coords with the center of ball as origin R is the radius of the circle of intersecti on � Now, the next question would be: given two points on the ball (first and last), what would be the rotation(axis+ angle).

  5. Arcball user interface � Rotation axis + angle are both easy to calculate from the two vectors. Arcball interpretation: Screen view and events: Mouse-location 1 Center of screen Mouse-location 2

  6. Arcball user interface � Rotation axis: is the vector normal to the plane spanned by the two mouse vectors. � Therefore R = m1 x m2 � Rotation angle is the angle between those two normalized vectors. � Therefore a = acos(m1* m2)

  7. Arcball user interface � Apparently, it is more natural to use twice the angle given from the arcball for the rotation. θ θ / 2 a θ

  8. Arcball user interface � Arcball property: Two arcs combined are equal to the arc beginning with the first arcs beginning point and ending with the second arc ending point. � This means arcball movement depends solely on the beginning and ending points - it is a conservative field function.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend