MAPaint Technical Report:
Look up Tables for Display to Image Coordinates
|
Next: Fixed Point Constraints
Up: Viewing Planes
Previous: Up is Up
To make the calculation more efficient we can minimize the number of
floating point operations by pre-calculating the trigonometric terms
and storing them as look-up tables (LUT). In this case we are
transforming from the 2D display frame back to 3D image coordinates
and to avoid round-off error we require 6 LUTs for each of x' and
y' to (x,y,z). Note x' and y' are always integer coordinates
in the display frame. In our coordinate system we want the transform from
(x',y',d) to the original image coordinates therefore using
equation 6 we get
We define LUTs for x' to (x,y,z) which include the constant terms:
| Tx'x(x') |
= |
 |
|
| Tx'y(x') |
= |
 |
(14) |
| Tx'z(x') |
= |
 |
|
and similarly for y' to (x,y,z):
| Ty'x(x') |
= |
 |
|
| Ty'y(x') |
= |
 |
(15) |
| Ty'z(x') |
= |
 |
|
To determine the new section image the transformations can be
calculated by look-up plus one addition:
If the viewing direction does not change and only the distance
parameter is incremented by
then the y' LUTs are
unchanged and the x' LUTs become:
Note
R-1 = RT. The LUTs are calculated over the maximum
range possible for x' and y' which is determined by forward transform
(equation 5) of the bounding box of the
original image.
Next: Fixed Point Constraints
Up: Viewing Planes
Previous: Up is Up
Richard Baldock
1998-06-05