In the book in Chapter 3 he mentions Upright Space. I understood everything so far and I did every exercise from Chapter 2 with vectors correctly. But I cannot understand how did he get Upright Space unit vectors for x and y axis. Can someone help me here please?
So his example was this:
The origin of his object in world space is (4.5, 1.5) . .What I dont understand is how did he obtain these two vectors: x axis unit vector is (0.87, 0.50) and y: (−0.50, 0.87) . Can someone give me step by step solution please?
3.3.2 Specifying Coordinate Spaces We are almost ready to talk about transformations. But there’s actually one more basic question we should answer first: exactly how do we specify a coordinate space relative to another coordinate space?7 Recall from Section 1.2.2 that a coordinate system is defined by its origin and axes. The origin defines the position of the coordinate space, and the axes describe its orientation. (Actually, the axes can describe other information, such as scale and skew. For the moment, we assume that the axes are perpendicular and the units used by the axes are the same as the units used by the parent coordinate space.) So if we can find a way to describe the origin and the axes, then we have fully documented the coordinate space. Specifying the position of the coordinate space is straightforward. All we have to do is describe the location of the origin. We do this just like we do for any other point. Of course, we must express this point relative to the parent coordinate space, not the local child space. The origin of the child space, by definition, is always (0, 0, 0) when expressed in child coordinate space. For example, consider the position of the 2D robot in Figure 3.2. To establish a scale for the diagram, let’s say the robot is around 5 1/2 feet tall. Then the world-space coordinates of her origin are close to (4.5, 1.5). Specifying the orientation of a coordinate space in 3D is only slightly more complicated. The axes are vectors (directions), and can be specified like any other direction vector. Going back to our robot example, we could describe her orientation by telling what directions the green vectors labeled +x and +y were pointing—these are the axes of the robot’s object space. (Actually, we would use vectors with unit length. The axes in the diagrams were drawn as large as possible, but, as we see in just a moment, unit vectors are usually used to describe the axes.) Just as with position, we do not use the object space itself to describe the object-space axis directions, since those coordinates are [1, 0] and [0, 1] by definition. Instead, the coordinates are specified in upright space. In this example, unit vectors in the +x and +y object-space directions have upright-space coordinates of [0.87, 0.50] and [−0.50, 0.87], respectively. What we have just described is one way to specify the orientation of a coordinate space, but there are others. For example, in 2D, rather than listing two 2D vectors, we could give a single angle. (The robot’s object axes are rotated clockwise 30o relative to the upright axes.) In 3D, describing orientation is considerably more complicated, and in fact we have devoted all of Chapter 8 to the subject. We specify a coordinate space by describing its origin and axes. The origin is a point that defines the position of the space and can be described just like any other point. The axes are vectors and describe the orientation of the space (and possibly other information such as scale), and the usual tools for describing vectors can be used. The coordinates we use to measure the origin and axes must be relative to some other coordinate space.
EXERCISE AT THE END I KNOW FROM A TO E AFTER THAT NO IDEA:
Assume that the robot is at the position (1, 10, 3), and her right, up, and forward vectors expressed in upright space are [0.866, 0,−0.500], [0, 1, 0], and [0.500, 0, 0.866], respectively. (Note that these vectors form an orthonormal basis.) The following points are expressed in object space. Calculate the coordinates for these points in upright and world space. (a) (−1, 2, 0)
(b) (1, 2, 0)
(c) (0, 0, 0)
(d) (1, 5, 0.5)
(e) (0, 5, 10)
The coordinates below are in world space. Transform these coordinates from world space to upright space and object space.
(f) (1, 10, 3)
(g) (0, 0, 0)
(h) (2.732, 10, 2.000)
(i) (2, 11, 4)
(j) (1, 20, 3)