[CST-2] Advanced Graphics

pjt33@cam.ac.uk pjt33@cam.ac.uk
Sat, 01 Jun 2002 16:50:41 +0100


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

I think it should be x^2 = k(y^2 + z^2) because he doesn't specify "unit 
cone" (or whatever you call it).

> (** 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?? **)

End-caps.

> 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 ???
>
> So I can't see what the special cases are...?

Wrong.  Consider (here goes with the ASCII art!)

         \   |/
          \  /
           \/|
           /\|
          /  \
         /   |\
        /----+-\
       /     |  \
      /      |   \
     /-------+----\
    /        |     \

The intersection points straddle neither end-cap, but the ray intersects 
both end-caps.  The only special case is that you _don't_ need to check the 
end-caps when both intersections are within the range.

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

I made it (-sqrt(y^2+z^2), y, z) for k=1 (which agrees with consensus), and 
argued that you scale homogenous vector by matrix

 [1     0         0     0] -1
 [0 1/sqrt(k)     0     0]
 [0     0     1/sqrt(k) 0]
 [0     0         0     1]

for general case.

Plus normals for end-caps, of course.

Peter
=====
Peter Taylor
pjt33@cam.ac.uk