03/26/2002
15-462 Graphics I
13
Ray-Sphere Intersection I
•
Common and easy case
•
Define sphere by
–
Center
c
= [x
c
y
c
z
c
1]
T
–
Radius r
–
Surface f(
q
) = (x – x
c
)
2
+ (y – y
c
)
2
+ (z – z
c
)
2
– r
2
= 0
•
Plug in ray equations for x, y, z: