Welcome to the next lesson in our exploration of the mathematics behind parametric design. In our previous session, we delved into the dot and cross products, discovering how these vector operations allow us to analyze geometric relationships like orthogonality, angles, and surface orientation. We now have the tools to describe and measure static geometry.
This lesson takes the next logical step: moving and manipulating that geometry. We will explore the three fundamental transformations that are the building blocks of almost all complex forms: translation, rotation, and scaling. Our goal is to understand how to apply these transformations by using their core algebraic formulas. Mastering these foundational equations will provide you with a deep understanding of how points move in space, preparing us for the more powerful and efficient matrix-based methods we will tackle in our next lesson.
Translation: Shifting Geometry in Space
The simplest transformation is translation, which involves moving an object from one position to another without changing its size, shape, or orientation. In our first lesson of this module, we established that a vector represents a displacement. Translation is the direct application of that concept.
To translate a point by a vector , we simply add the vector's components to the point's coordinates. The new point, , is given by:
To translate an entire object, such as a polygon or a curve, we apply this same operation to all of its defining points (e.g., its vertices).
For a clear, practical demonstration of this process, the following video explains how to translate a shape by applying simple addition and subtraction to its vertices' coordinates.
Translations Reflections and Rotations - Geometric Transformations!
This video, "Translations Reflections and Rotations" by The Organic Chemistry Tutor, provides an excellent, straightforward explanation of transformations using algebraic rules.
Watch the first part of the video covering translation. Pay close attention to how a translation like "five units to the right and four units down" is converted into a rule applied to the (x, y) coordinates of each vertex.
For a concise, formal definition that aligns with the formulas above, please refer to the following text.
2D Transformation - Computer Graphics
This article provides the mathematical basis for 2D transformations. We will return to it throughout this lesson.
Please read the section titled Translation. Note how it presents the transformation both as a pair of equations and as vector addition, reinforcing the concept. You can disregard the mention of matrices for now; we will focus on them later. Find the text describing the process.
Scaling: Resizing Geometry
Scaling changes the size of an object. This transformation can be uniform, where the object is scaled by the same factor in all directions, or non-uniform, where it is scaled by different factors along different axes. The scaling operation is performed relative to a point, which by default is the coordinate system's origin (0,0).
To scale a point by factors in the x-direction and in the y-direction, we multiply its coordinates by these factors. The new point, , is:
If , the scaling is uniform. If the factors are greater than 1, the object enlarges; if they are between 0 and 1, it shrinks.
Let's return to the TutorialsPoint article for the formal definition of scaling.
2D Transformation - Computer Graphics
This resource clearly outlines the algebraic rule for scaling.
Find and read the section titled Scaling. Focus on the core formulas and the explanation of how the scaling factors S_X and S_Y affect the object's dimensions.
Rotation: Orienting Geometry
Rotation turns an object around a fixed point, known as the center of rotation. Like scaling, we'll assume rotation occurs around the origin (0,0) for now.
The formulas for rotation are derived from trigonometry. Given your background in mathematics, you'll appreciate seeing how they are constructed rather than just being presented.
-
Any point can be represented in polar coordinates, where is the distance from the origin and is the angle from the positive x-axis. Using trigonometry, we know:
-
To rotate this point by an angle , we create a new point at the same distance but at a new angle, . The new coordinates are:
-
Using the trigonometric identities for angle addition:
-
We can expand the expressions for and :
-
Substituting and back into these expanded equations gives us the final rotation formulas:
By convention, a positive angle results in a counter-clockwise rotation.
Now, please read the section in the TutorialsPoint article that walks through this exact derivation.
2D Transformation - Computer Graphics
This section formalizes the derivation we just discussed.
Please read the section titled Rotation. Follow the derivation from the representation in polar coordinates to the final algebraic formulas. Again, you can ignore the matrix representation for now.
While the general formulas work for any angle, there are simplified rules for common rotations like 90° and 180°, which are just special cases. The following video explains these rules.
Translations Reflections and Rotations - Geometric Transformations!
The Organic Chemistry Tutor video also covers rotation by providing simple coordinate-swapping rules.
Watch the segment on rotations. Notice the rules provided for 90° clockwise, 90° counter-clockwise, and 180° rotations. For instance, for a 90° counter-clockwise rotation, the rule is (x, y) \rightarrow (-y, x). You can verify this by substituting \theta = 90^\circ (\cos 90^\circ = 0, \sin 90^\circ = 1) into our general formulas.
The Importance of Order
What happens when we want to apply multiple transformations, such as a rotation and a translation? We apply the formulas sequentially. However, the order in which we apply them is critical. Transformations are generally not commutative.
Let's consider a simple example. Take the point .
-
Case 1: Rotate first, then translate.
- Rotate by +90° counter-clockwise:
The point becomes . - Translate by the vector :
The final point is (10, 4).
- Rotate by +90° counter-clockwise:
-
Case 2: Translate first, then rotate.
- Translate by the vector :
The point becomes . - Rotate by +90° counter-clockwise:
The final point is (0, 14).
- Translate by the vector :
The results, (10, 4) and (0, 14), are entirely different. This demonstrates that the sequence of operations matters profoundly. This is a fundamental concept in graphics and parametric design, and it's the primary reason we need a systematic way to handle transformations, which we'll discover in the next lesson.
Conclusion
In this lesson, we have grounded our understanding of geometric transformations in their fundamental algebraic formulas. You now know how to mathematically express the movement, resizing, and reorientation of geometric objects.
Here are the key takeaways:
- Translation shifts a point by adding a vector's components: , .
- Scaling resizes a point by multiplying by scaling factors: , .
- Rotation turns a point using trigonometric functions: , .
- To transform a complex object, we apply these formulas to its individual vertices.
- The order in which transformations are applied is critical and affects the final outcome.
While applying these formulas one by one works, it can become cumbersome for complex sequences. In our next lesson, we will see how these separate algebraic rules can be unified into a single, elegant mathematical tool: the transformation matrix. This will allow us to represent and combine transformations far more efficiently.