I am looking at a book about ray-tracing and there is this equation about a ray intersecting a sphere.
It shows this equation:
dot((A + t*B - C),(A + t*B -C)) = R*R
Which I think I understand. Now by moving terms of the equation to the left hand side it becomes this:
t*t*dot(B,B + 2*t*dot(B,A-C) + dot(A-C,A-C) - R*R=0
Could somebody explain what steps are taken to achieve this? I understand moving - R*R to the left and then getting 0 after = but that's about it.
I think moving the terms is necessary to get the t out of the dot product as t is the one variable that is unknown for this case.
Hope this falls under Arithmetic.
Help much appreciated.
It shows this equation:
dot((A + t*B - C),(A + t*B -C)) = R*R
Which I think I understand. Now by moving terms of the equation to the left hand side it becomes this:
t*t*dot(B,B + 2*t*dot(B,A-C) + dot(A-C,A-C) - R*R=0
Could somebody explain what steps are taken to achieve this? I understand moving - R*R to the left and then getting 0 after = but that's about it.
I think moving the terms is necessary to get the t out of the dot product as t is the one variable that is unknown for this case.
Hope this falls under Arithmetic.
Help much appreciated.
Last edited: