0
$\begingroup$

I've got this question:


A opaque ball in the space with center $(10,0,-1)$ with radius with $r = 1$. A ray tracing program is tracing a ray from the eye position $(0,0,10)$ with the ray direction $(1,0,-1)$.


I've figured out that the ray will strike the ball at $(10,0,0)$, but how do I find the normal vector at this intersection point?

$\endgroup$

1 Answer 1

0
$\begingroup$

Hint:

If $C=(a,b,c)^T$ is the center of a sphere of radius $R$ and $P=(x_P,y_P,z_P)^T$ is a point on the sphere, the normal vector to the sphere in $P$ is a unitary vector parallel to the radius in $P$: $$ \vec n=\frac{1}{R}(a-x_P,b-y_P,c-z_P)^T $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.