I've written my own 3D Game Engine in Java by using OpenGL (LWJGL). I'd like to write a Raytracer that works on the CPU, not on the GPU because the memory for my GPU is limited and the amount of data that I use might be bigger than the memory available on my graphics card.
I did some ray-triangle intersection stuff and so on but I need to know how to interpolate values in a triangle like OpenGL does.
What I know is the x,y and z coordinate of each vertex.
What algorithm is usually used in OpenGL for doing Interpolation like I described.