Graphics Reference
In-Depth Information
F
5
0
1
P
t d
F ( P 1 t d ) 5 0
P
d
Figure 24.5: The intersection of a ray (defined by a point P and a direction d ) and an
implicit surface defined by F ( x , y , z )= c must occur at a point Q = P + t d (for some value
of t) which satisfies F
(
Q
)=
0 . So to find the intersection, we can solve F
(
P
+
t d
)=
cfor
the unknown t; the intersection point is then P
+
t d .
For instance, if F ( x , y , z )= x 2 + y 2 + z 2 , and we consider the intersection of
the ray with P =(
2, 0, 0 ) and d =( 1, 1
/
3, 0 ) with the level set F = 1 (the unit
sphere), we must solve
F ( P + t d )= 1,
(24.7)
that is,
F (
2 + t , t
/
3, 0 )= 1.
(24.8)
Applying the formula for F , this gives
2 + t ) 2 +( t
3 ) 2 + 0 2 = 1,
(
/
(24.9)
which is a quadratic in t , namely,
10 t 2
36 t + 27 = 0,
(24.10)
whose solutions are
± 36 2
t = 36
4
·
10
·
27
1.065, 2.535 ;
(24.11)
2
·
10
these correspond to the points
Q 1
(
0.935, 0.355, 0 ) and Q 2
( 0.535, 0.850, 0 )
(24.12)
on the sphere.
Inline Exercise 24.1: The intersections we just computed depended on the
coordinates ( P x , P y , P z ) of P and the coordinates ( d x , d y , d z ) of d . Express the
intersection points in terms of these coordinates rather than their particular
values, and determine under what conditions an intersection exists.
With these generalities on implicit curves and surfaces in mind, we can
now move on to discuss the ways in which implicit functions are most often
represented.
 
 
Search WWH ::




Custom Search