 The theory behind 3D graphics: This is how virtual worlds are created

Translation

Vectors can be used to move points, and thus our objects. This shift is called translation. For example, if you add another vector to the position vector of a point (vector from the origin and the point itself), this point is shifted in the direction of the vector.

The sum of two vectors is defined as the sum of their components, ie we add the vectors by adding x with x, y with y and z with z.

If this procedure is used for all points or the position vectors of these, one can easily move an object by knowing the required vector.

The difference between two vectors can be determined using the same procedure:

That would move our object in the opposite direction of the vector.

Stretching/compressing

In order to enlarge or reduce a vector, it must be multiplied by a number. To do this, the number is multiplied by each component of the vector. The result is the stretched or compressed vector.

If a is negativethe direction of the vector is reversed. For our objects, this multiplication means an increase (if a> 1) or a decrease (if a <1) of the object.

Length of a vector

The length of a vector can be determined by the Root of the sum of the squares of its components.