Copy 'n' pasted some codes from http://www.scratchapixel.com/assets/Uploads/Lesson001/Source%20Code/raytracer.cpp in order to make a real ray-tracing demo.