Graphics in Three Dimensions
B. J. Korites · Apress eBooks · 2018
In this chapter, you will learn how to create, translate, and rotate three-dimensional objects in a three-dimensional space. You will also learn how to project and display them on the two-dimensional surface of your computer screen. General movement of an object implies both translation and rotation. I discussed this in two dimensions in the previous chapter. You saw that translation in two dimensions is trivial. Just add or subtract a quantity from the x coordinates to translate in the X direction, similarly for the Y direction. In three dimensions, it is still trivial, although you are able now to translate in the third dimension, the Z direction, simply by adding or subtracting an amount to an object’s z coordinates. Rotation is another matter, however. The analysis follows the method you used in two dimensions but is complicated by the fact that you now are able to rotate an object around three coordinate directions. In this chapter, I will not discuss 3D translation any further but will concentrate instead on 3D rotation. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.