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

computer graphics course 2006
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Computer Graphics Course 2006

Arcball user interface

slide-2
SLIDE 2

Arcball user interface

When viewing a 3D model on the computer screen,

  • ften 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

  • bjects 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.

slide-3
SLIDE 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.

slide-4
SLIDE 4

Arcball user interface

The mathematical definition of that

mapping would be:

Now, the next question would be: given

two points on the ball (first and last), what would be the rotation(axis+ angle).

  • n

intersecti

  • f

circle the

  • f

radius the is R

  • rigin

as ball

  • f

center the with coords screen are y) (x, : Whereas

  • therwise

) x , , ( x case in ) , , ( ) , (

2 2 2 2 2

⎪ ⎩ ⎪ ⎨ ⎧ − − > + y R y x R y y x y x

slide-5
SLIDE 5

Arcball user interface

Rotation axis + angle are both easy to calculate from the two vectors.

Mouse-location 1 Mouse-location 2 Center of screen

Screen view and events: Arcball interpretation:

slide-6
SLIDE 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)

slide-7
SLIDE 7

Arcball user interface

Apparently, it is more natural to use twice the angle

given from the arcball for the rotation.

θ

2 / θ θ

a

slide-8
SLIDE 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

  • n the beginning and

ending points - it is a conservative field function.