Correction of Planar (Stretch) Distortion

Written by Paul Bourke
November 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 Projections

Written by Paul Bourke
January 1991

Source: glues.h and glues.c.


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

Reflective balls in the main street of Adelaide, Australia.




Mappings in the Complex Plane

Written by Paul Bourke
July 1997


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.