[CST-2] Advanced Graphics

Jamie Shotton jdjs2@cam.ac.uk
Sat, 1 Jun 2002 15:26:24 +0100


In http://www.cl.cam.ac.uk/tripos/y2001p7q9.pdf part (b) he asks for the
intersection points of a ray with a cone.  I would like to check that my
understanding is correct:

1) substitute ray equation into x^2 = z^2 + y^2    (eq of a cone)

2) simplify to quadratic, solve quadratic for t

3) gives 0 real solutions     => no intersections
         1 repeated real soln => ray scrapes the edge of the cone
         2 real solns         => two intersection points
   if denominator = 0 then ray is along x-axis so no intersections

(** in my lecture notes I've got something written about possibly having
up to four intersection points if you are allowed the two sided cone -
how is this possible if you are solving a quadratic?? **)

4) check values of t are >=0 else discard (otherwise behind eye)

5) check that the x values are within the range, if not, discard.

Then for part (ii) he asks for closed cone stuff:

4) if you have 2 intersection points t_i and t_j, if either straddle the
x values of either of the two end caps (total of four cases) then
intersect with end-cap(s) instead.
   If you have 1 intersection point only then it can't have cross
through an end-cap ???

5) discard negative t values.

So I can't see what the special cases are...?

Finally, does the normal vector work out to be (-(y^2+x^2), x, x)
normalised of course?

Cheers,
Jamie