Transformation between two set of points
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.
When discussing transformations between two sets of points, we theorize and apply mathematical concepts to convert, map, or otherwise relate one set of points to another within a specified space or coordinate system. This topic plays a vital role in various fields such as computer graphics, robotics, and even machine learning.
Types of Transformations
1. Linear Transformations
Linear transformations maintain the operations of vector addition and scalar multiplication. They are represented by matrices and typically include operations such as rotation, translation, scaling, and shearing.
Matrix Representation
A linear transformation can be described using matrices where each point in the original set is multiplied by a transformation matrix to get the new set of points.
For example, a 2D transformation can be represented as:
Where: • is the transformation matrix. • is the translation vector. • is the original point. • is the transformed point.
2. Affine Transformations
An affine transformation is an extension of linear transformations that includes translation. Therefore, it not only applies linear transformations but also shifts the entire set of points by some vector.
The general form of an affine transformation in 3D space is:
3. Non-linear Transformations
Non-linear transformations do not preserve operations like vector addition and scalar multiplication. They can describe more complicated curvature transformations and mapping, often used in advanced graphics techniques and machine learning applications.
Common Transformations
Here's a table that summarizes some key types of transformations and their effects:
| Transformation Type | Description | Matrix Form |
| Translation | Shifts points by a vector | T(x, y) = [x1 + tx, y1 + ty] |
| --- | --- | --- |
| Rotation | Rotates points about the origin | |
| --- | --- | --- |
| Scaling | Scales points by factors | |
| --- | --- | --- |
| Shear | Distorts by "slanting" |
|
Applications
Computer Graphics
Transformations are critical in rendering scenes, where objects need to be transformed from model space to world space and eventually to screen space using a series of transformations.
Robotics
In robotics, transformations are used to translate the position and orientation of robotic arms or mobile robots in their working environment.
Machine Learning
Certain types of neural networks leverage transformations, particularly scaling, and translation, in data preprocessing steps to incline patterns better in a dataset.
Image Processing
In image processing, transformations such as affine and non-linear transformations are often used for operations like skew correction, rotation alignment, or even complex modeling like perspective correction.
Conclusion
Transformations between two sets of points present a rich and versatile framework for manipulating spatial data across numerous fields. By seamlessly mapping points, either linearly or non-linearly, these transformations facilitate complex spatial arithmetic, offering robust methodologies to apply in various practical domains. Understanding these operations' inner workings and representations is an essential skill for anyone working in fields involving spatial data manipulation.
Related reading
- Traveling salesman example with known global optimum
- Travelling Salesman with multiple salesmen?
- Travelling salesman with repeat nodes dynamic weights
- Traversal of an n-dimensional space
- Traverse Matrix in Diagonal strips
- Traversing Line Segments
- Triangle / Circle enclosing a set of points
- Triangle partitioning

DSA Fundamentals
Master algorithmic patterns and data structures through hands-on LeetCode-style problems - from arrays and hashing to dynamic programming and advanced graphs.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Data Structures & Algorithms practice on Codemia
Step through 300 algorithm problems with animated visualisers that show the data structure changing as the code runs.