Hi guys !
I'm doing a raytracer in C. I have to apply textures on a sphere. I have the coordinates x, y,z where my ray hits the sphere, the radius of the sphere and a function that returns the color of the pixel of the texture for a given x and y.
Do you have a formula to get the x,y of the texture from the x,y,z of the sphere and the radius r ?
FrénésieMember Since 16 Apr 2012
Offline Last Active May 31 2012 02:48 PM