Graphics Reference
In-Depth Information
Gimbal lock. With Tutorial 16.2, select the tiger mesh node (under the root
note ) and activate the “Rotate” radio button in the XformInfoControl . Adjust
the y slider bar to see the tiger mesh rotate about the green ( y ) axis. We know the
rotation is about the green axis because we can observe the entire mesh moving
except the position where the green axis intersects the mesh object. Now, leave the
y slider bar (
θ x 1 ). We notice
that the tiger mesh does not rotate about the red axis! If we reset the transforms
and then adjust the x slider bar, we can see the corresponding rotation about the
red ( x ) axis. In general, after two rotations about different axes, there will be no
more clear relationships between the rotation slider bars and the orientation of the
tiger mesh, after which it becomes virtually impossible to interactively control the
orientation of the mesh. This situation is known as gimbal lock. This is the topic
of discussion in the next section.
θ y 1 ) with a nonzero value and adjust the x slider bar (
16.2
Rotation in 3D
Recall that in Lib14 (on p. 413), when generalizing our library to support 3D
graphics, we updated the transformation operator of XformInfo (Equation (9.10),
p. 249),
R z
M
=
T
(
p
)
S
(
s
)
( θ z )
T
(
p
)
T
(
t
) ,
to Equation (15.1) (on p. 415),
R z
R y
R x
M
=
T
(
p
)
S
(
s
)
( θ z )
( θ y )
( θ x )
T
(
p
)
T
(
t
) ,
where p is the pivot position, t is the translation vector, s is the scaling factor, and
( θ x , θ y , θ z )
are the angles of rotations about the corresponding axes.
Roll, pitch, yaw.
In
some
applications,
e.g.,
flight simulators,
θ z is referred
to as the roll , θ x is referred to
as the pitch ,andθ y is referred
to as the yaw .
16.2.1
Euler Transform and Gimbal Lock
From 2D to 3D, we generalized the rotation from a single angle describing the
rotation about the z -axis to three angles describing rotations about the three major
axes,
R z
R y
R x
( θ
, θ
, θ
)=
( θ
)
( θ
)
( θ
) .
R e
(16.1)
x
y
z
z
y
x
The rotation defined by Equation (16.1) is referred to as the Euler transform ,and
the three angles describing the three rotations about the major axes are referred
Search WWH ::




Custom Search