This is a problem that I need to figure out to complete a Java Raytracer Render Engine.
Let's say a Light is positioned at (x, y, z) position in a 3D Environment. There's also a metallic object, let's say an sphere (composed by triangles: [ The triangles are joined by vertices, each of them has a normal vector and a position ]) at another (x, y, z) position in the same environment.
A light ray is created from the light source and it hits the "sphere" in one of it's triangles, generating an intersection ray. This is going to be the Incidence Ray.
How would you calculate the Reflected Ray or Reflected Vector of the Ray on that Triangle?
I researched a bit and saw that in a 2D Plane you can calculate the Angle between the Normal Vector and the Ray Vector, and with that calculation you can create a new reflected vector. But this doesn't apply to 3D Vectors, right?.