9.1 Rotating Objects in 2D 163
After applying the orientation in this way, we can then apply the change in
position as before. The total process looks like this:
q =q
b
+p [9.2]
where p is the position of the object. This equation works in both 2D and 3D, although
the definition of is differe nt, as we ’ ll see later in the chapter.
Forourcarexample,weget:
q =
0.38 −0.92
0.92 0.38
1.5
−0.75
+
4
3.85
=
1.27
1.10
+
4
3.85
=
5.27
4.95
This calculation is called a transformation. We’re calculating the location of part of
an object based on the position and orientation of the origin of the object it belongs
to and the relative position of the component. Transformations can be thought of
as converting between different sets of coordinates. In this case, we’r ...