A few screenshots and a video of the interactive CUDA raytracer with added support for OBJ files.
It took me a while to complete the algorithm that extrapolates normals in a triangle. The trick is to compute the area of each triangle defines by the intersection point and the three vertices. Once you get that, just find the weighted mean, and you're done. Here is the code:
GPUs are amazing, I tried to use the Mandelbrot set as a texture, because it's amazingly beautiful and easy to implement. The algorithm I used is the following:
__device__ void
mandelbrotSet( const SceneInfo& sceneInfo, constfloat x, constfloat y,
float4& color )
3D Parametric Curves are cool because they
make it easy to construct beautiful shapes out of simple mathematical formulas.
Since I am lazy and not good at modeling 3D scenes, I thought that using these
equations was probably the best way to get nice images.
The following curves are made of cylinders, following the paths defined by the parametric curves.
Here are the functions I used to generated the shapes: