Graphics Programs Reference
In-Depth Information
Looking at the same poles through a telescope brings them closer and makes them look
bigger, but not by the same amount. Poles closer to the telescope move just a little
closer to the viewer, while poles far away move much closer and also get bigger (although
still smaller than nearby poles).
In order to compute such a projection mathematically, we need an expression that
will take a quantity z (the distance of a telephone pole) and will shrink it nonlinearly to
z such that z = 0 (a telephone pole at the viewer's position) will result in z =0(no
movement) and large values of z will yield z values in the interval [0 ,k ] and approaching
k slowly. One choice for such an expression is
z = kz/ ( z + k ) ,
(4.4)
where k is a parameter selected by the user. This expression is similar to the thin lens
equation from optics and also Equation (3.1). The Mathematica code
k=10.;
Table[k z/(z+k), {z,0,100,5}]
Table[%[[i+1]]-%[[i]], {i,1,20}]
Table[Point[{%%[[i]],0}], {i,1,21}];
Show[Graphics[%]]
selects k =10and21 z values from 0 to 100 in steps of 5. It produces the 21 numbers
0, 3.33, 5, 6, 6.67, 7.14, 7.5, 7.78, 8, 8.18, 8.33, 8.46, 8.57, 8.67, 8.75, 8.82, 8.89, 8.95,
9, 9.05, and 9.09. They start at zero and approach k (Figure 4.41a). The third line
computes the 20 differences between consecutive numbers. It produces 3.33, 1.67, 1,
0.67, 0.47, 0.36, 0.28, 0.22, 0.18, 0.15, 0.13, 0.11, 0.10, 0.083, 0.074, 0.065, 0.058, 0.053,
0.048, and 0.043, and it is obvious that the differences get smaller and smaller, showing
that points brought in from infinity converge at distance k from the viewer.
0
5
10
(a)
(b)
Figure 4.41: (a) Twenty Nonuniformly Spaced Points. (b) Varying Heights.
Exercise 4.14: What should be the distance z of a point in order for it to be moved
toadistance z = k/ 2 by the telescopic transformation?
Search WWH ::




Custom Search