Graphics Programs Reference
In-Depth Information
y
y
P
Infinite
circle
x
z
P *
O
θ
/2
θ
z
x
k
V
(a)
(b)
Figure 4.2: Hemispherical Fisheye Projection.
therefore a variable; it depends on P , which is why this type of projection justifies the
name nonlinear .
The derivation of s starts with Figure 4.2b, which shows that tan θ =
|
P
|
/k ,im-
P |
plying θ =arctan[
|
P
|
/k ]. Similarly, the transformed point satisfies tan( θ/ 2) =
|
/k ,
which yields the scaling factor
= k tan (arctan[
/k ]) / 2
P |
|
| P |
s = |
= k tan( θ/ 2)
|
.
(4.2)
P
|
P
|
|
P
|
Exercise 4.1: Use mathematical software to compute the scale factors for several
| P |
values from 1 to 10,000.
If the programming language or mathematical software being used cannot compute
the arctan to the desired accuracy, the following expressions (where h stands for
)are
equivalent and employ only sines and cosines. From h/k =tan θ and sh/k =tan( θ/ 2),
we obtain
|
P
|
sin θ
cos θ
k
h tan( θ/ 2) = tan( θ/ 2)
= 1
cos θ
sin θ
= cos θ (1
cos θ )
sin 2 θ
s =
,
tan θ
or equivalently
sh = k tan( θ/ 2) = k 1
cos θ
sin θ
.
Notice that points that are the farthest from the origin on the xy planehavean
angle θ in Figure 4.2b close to 90 . Thus, their projections have an angle close to 45 .
A view angle of 45 implies that the distance of such a projected point from the origin
equals the distance k of the standard position from the origin. The result is that all
the points on the (infinitely large) xy plane are moved by the hemispherical fisheye
projection onto the radius- k circle located in the xy plane and centered on the origin.
 
Search WWH ::




Custom Search