Graphics Reference
In-Depth Information
Figure 15.5. Zooming in polar hyperbolic space.
the value of k is a way to control how much of the scene is
zoomed in upon and how much ends up at the edges. The
images in Figure 15.5 show how this looks when applied to
a street map of San Diego, while Figure 15.6 shows a hyper-
bolic rendering of a map of Corvallis, Oregon, that includes
overlays for streets, buildings, and parks.
When doing shader programming, there is always a
concern that needing to compute a handful of transcenden-
tal functions per vertex will kill performance. After all, turn-
ing an ( x , y ) into ( r ,Θ) involves using a square root and an
arctan. Producing the final ( x ′, y ′) involves using a sine and
cosine. Fortunately, the equations simplify out all of these
transcendantal functions except the square root:
Figure 15.6. Hyperbolic geom-
etry display of Corvallis, Oregon,
showing streets (orange), build-
ings (yellow), and parks (green).
r
=+
x
2
y
2 ,
r
rk
x
r
x
rk
xr
′ = ′
cos
Θ
=
=
.
+
+
And, similarly,
r
rk
y
r
=
y
rk
=
yr
sin
Θ
=
.
+
+
Search WWH ::




Custom Search