Graphics Programs Reference
In-Depth Information
w
r
r interval
u
sin w
k
0
90
2 sin w
[0 ,k/ 2]
top
0
1
sin w
2
90
180
(1
) k
[ k/ 2 ,k ]
top
1
0
(1 + sin w
2
180
270
) k
[ k, k/ 2]
bottom
0
→−
1
k
270
360
2 sin w
[ k/ 2 , 0]
bottom
1
0
Table 4.9: Four Cases of w , r ,and u .
The complete mapping of the radius- k sphere to the radius- k circle is done in a
double loop, where w varies from 0 to 360 in the outer loop and u varies from 0 to 180
intheinnerloop. Foreachpair( u, w ), the point of the three-dimensional scene nearest
the viewer (who is located at the origin) is determined and is projected by computing
its r value from the table and using the pair ( r, u ), as well as information about “up”
or “down” from the table, as the polar coordinates of P .
Exercise 4.3: Rewrite Table 4.9 for a 180 angular fisheye projection.
The point directly behind the observer presents a special case. This point is reached
when w = 180 (implying r = k ), in which case any value of u will select this point.
This special point is therefore mapped to every point on the circle r = k .
Exercise 4.4: Explain the special case of the point directly in front of the viewer.
Often, a three-dimensional scene occupies every direction in space. The scene may
consist of several objects with patches of ground, water, and sky filling up every other
point. In such cases, every direction ( u, w ) will correspond to at least one point of the
scene. Sometimes, a scene consists of just objects, with no background. In such cases,
many pairs ( u, w ) will not correspond to any point of the scene. For such a pair, its
projection on the radius- k circle can be painted white or any other background color.
When the entire space around the viewer is projected into a circle, the angular
fisheye projection becomes one of many ways to map a sphere on a plane. Sphere
projections are the topic of Section 4.14. Every projection of a sphere into a plane
introduces distortions, and the two main distortions of the angular fisheye projection
are that (1) straight lines are mapped into curves and that (2) the hemisphere in front
of the viewer is projected into the inner half of the circle and can, with some practice,
be perceived and understood, but the hemisphere behind the viewer is projected into
the outer half of the circle, which is a ring, and this makes it unintuitive to perceive its
details.
Figure 4.10 shows two 180 examples (in grayscale and color; see page 236) of the
angular fisheye projection. It is possible to see that the distortion is uniform over the
entire picture. Also, the many straight lines are curved, but it is obvious that the curva-
ture diminishes in lines that are close to the center of the figure. The figure on the left
(courtesy of Joseph Bly [joebly 06]) is a lawn in New York's Central Park. It is obvious
that both the vertical lines (the tree in the foreground) and horizontal lines (the horizon
and the seats) are curved and that image details in the center are larger than those near
the periphery. The figure on the right (courtesy of Dick Termes [termespheres 05]) is
 
Search WWH ::




Custom Search