Graphics Reference
In-Depth Information
y
x
z
T
E
Figure 3.3: The coordinate system for the Dürer woodcut: The origin is at the screw eye,
labeled E, and the y- and z-coordinate axes are shown there. The picture frame lies in the
plane z
=
1
, parallel to the plane of the wall, z
=
0
. The x-coordinate arrow is horizontal,
lying in the plane of the wall, approximately in the direction of the shading lines on the
wall, while the z-coordinate arrow is horizontal and perpendicular to the wall. Due to the
effects of perspective, the x-direction and z-direction appear almost parallel, but pointing
in opposite directions, at the screw eye. The point T is the point in the frame of the drawing
plane (z
=
1
) closest to the screw eye. The z-direction points from the screw eye toward T,
making the xyz-coordinates of T be
(
0, 0, 1
)
.
coordinates within the plane of the paper. Thus, to every 3D point
(
x
,
y
,1
)
whose
last coordinate is 1, we have associated graph-paper coordinates
(
x
,
y
)
.
Now let's suppose that we observe a point
P
=(
x
,
y
,
z
)
of our object, as shown
in Figure 3.4; the line from
P
to
E
(the string) passes through the frame at a point
2
P
=(
x
,
y
,
z
)
. We need to determine the coordinates
(
x
,
y
,
z
)
from the known
coordinates
x
,
y
, and
z
.
In Figure 3.5, we've drawn two similar triangles in the
x
=
0 plane. The
vertices of the red triangle are (1) the point
E
=(
0, 0, 0
)
, (2) the projection of
P
onto the
x
=
0 plane, which is
(
0,
y
,1
)
, and (3) the point
(
0,
y
,0
)
, just below
E
.
The vertices of the blue triangle are (1) the point
E
, (2) the projection of
P
onto
the
x
=
0 plane, which is
(
0,
y
,
z
)
, and (3) the point
(
0,
y
,0
)
well below
E
.
Similarity tells us that the ratio of the vertical to the horizontal side in the two
triangles must be equal, that is,
y
/
z
. A similar argument, using triangles
in the
y
=
0 plane (best visualized by imagining a bird's-eye view of the scene),
shows that
x
/
1
=
y
/
1
=
x
/
z
, which can be simplified to give
x
=
x
z
,
(3.1)
y
=
y
z
.
(3.2)
2. The use of
P
and
P
to denote a point and another point associated to it can be very help-
ful in keeping the association in mind; unfortunately, most programming languages
disallow the use of primes and other such marks in variable names, so in our code, we
must use a different convention.