Correction of Planar (Stretch) DistortionWritten by Paul BourkeNovember 1989
The following mathematics and illustrations came from a project to undistort photographs taken of a flat piece of land. The photographs were taken from various angles to the ground and thus needed to be "straightened" so that relative area measures could be taken. The same technique could of course be used to intentionally distort rectangular areas. The conventional (cartesian) method of uniquely specifying a point in 2 dimensions is by two coordinates. For the unit square below these two coordinates will be called mu and delta, they are the relative distances along the horizontal and vertical edges of the square. ![]()
If the square above is linearly distorted (stretched) the internal coordinate mesh is also distorted but the relative distances (mu and delta) of a point P along two connected edges remains the same. ![]()
To undistort any point P within the polygon we need to find the ratios mu and delta. Point A is given by: ![]() Point B is given by
![]() For the point P along the line AB
![]() Substituting for A and B, equation 1
![]()
This gives two equations, one for the x coordinate and the other for the y coordinate, equation 2,3 ![]()
Dividing equation (2) by (3) removes delta, solving for mu gives a quadratic of the form ![]() where
![]() After solving the quadratic for mu, delta can be calculated from (1) above. |
Anamorphic ProjectionsWritten by Paul BourkeJanuary 1991
Anamorphism is a Macintosh utility which takes a line drawing as a PICT file and performs various nonlinear distortions upon it. The distortions available have been chosen from those which have been used historically by artists (and forgers). |
|
Each of the different distortions will be illustrated by using the following simple diagram.

For the following examples an additional grid will be placed over the image to further illustrate the nature of the distortion. Each type of distortion has controls associated with it, these are indicated by black "blobs" at the current position of the control points. To vary these parameters simply click and drag the control points.
| Cylindrical |
![]() |
| Conical |
![]() |
| Spherical |
![]() |
| Parabolic |
![]() |
| Rectonical |
![]() |
Notes
The only PICT drawing primitives which can be used are line segments.
Since the distortions are non linear, the distorted points alone a line segment do not lie in a straight line between the distorted end points of the line segment. Thus each line is split into a number of line segments in order to approximate the generally curved nature of the distorted lines. The result of this is distorted drawings with a much larger number of line segments.
The following illustrates the general form of various mappings in the complex plane. The mappings are applied to part of a unit disk centered at the origin as shown on the left hand side. The circle is filled with rays from the origin and arcs centered about the origin. A series of coloured rays further illustrate the mapping orientation.
z
|
exp(z)
|
z
|
log(z)
|
z
|
sqrt(z)
|
z
|
asin(z)
|
z
|
acos(z)
|
z
|
atan(z)
|
z
|
sin(z)
|
z
|
cos(z)
|
z
|
tan(z)
|
z
|
sinh(z)
|
z
|
cosh(z)
|
z
|
tanh(z)
|
z
|
z2
|
z
|
z2 + z
|
z
|
1 / (z + 1)
|
z
|
(z - 1) / (z + 1)
|
z
|
(z2 - 1) / (z2 + 1)
|
z
|
(z - a) / (z + b)
|
z
|
(z2 + z - 1) / (z2 + z + 1)
|
z
|
(z2 + z + 1) / (z + 1)
|
|
Mapping software written by myself, interface using the FORMs
library, rendering with GeomView, conducted on a SGI Indigo-2.
|