POV-Ray : Newsgroups : povray.advanced-users : For the love of dot products! : For the love of dot products! Server Time
28 Jul 2024 20:30:02 EDT (-0400)
  For the love of dot products!  
From: Daniel Patrick Johnson
Date: 14 Apr 2004 11:37:32
Message: <407d5abc$1@news.povray.org>
On this page of the documentation 
http://www.povray.org/documentation/view/116/

It says "Solving T from that is rather trivial math. ", but after hours 
of working on it I can't figure it out.  I haven't ever had a class in 
linear algebra, but usually I can figure stuff out on my own, and this 
time I just can't.  Maybe it is that when you multiply everything out it 
turns into way too many terms for me to handle, but that never stopped 
me in calculus class so why should it stop me now.  I got pretty much 
the same thing in my ray tracing book, so I assume it is well known, and 
  I am tottaly confident it is the right result, but it just naggs at me 
that I don't really know why.

I understand the basic strategy for solving it is to get it into the 
form A*t^2 + B*t + C = 0, and then just using the quadratic formula on 
it.  My book shows this step where the POV-Ray documentation page skips 
it.

A = D.D
B = P.D
C = P.P - R^2

Here "." is the dot product

When I work out the math I figured out what "A" is.  I'm not totally 
sure why you can substitute "V" for "P", and <X0,Y0,Z0>, but when I do I 
get the result for "C".  And last I always get a 2 in "P.D" for the "B" 
coefficient.

Anyone know where I can find all the math worked out in detail?  I'm not 
a fan of writing proofs, but I sleep better after reading them.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.