I have to implement simple ray tracing algorithm, but I can not figure out How can I get Normal Vector of the sphere If I have the origin and radius of the sphere and the direction of the ray.
thanks
Wiki aboute sphere but i can not figure it out of this
I have to implement simple ray tracing algorithm, but I can not figure out
Share
I have find the solution: here is the code in C#: