material and texture classes moved to material.(cc,h)
2D texture mappings from textures.cc polished and moved to material.h
add ColourMap class and subclasses to make textures more flexible
two example textures: CheckersTexture and CloudTexture (using Perlin noise)
#!/usr/bin/python
from raytracer import Raytracer, Light, Sphere, Triangle, NormalVertex, Material
from objreader import LoadWavefrontObjFile
import Image
rt = Raytracer()
mat = Material(colour=(0.9, 0.9, 0.9))
LoadWavefrontObjFile(rt, "../models/obj/monkey.obj", mat, 1.5)
light = Light(position=(-5.0, 2.0, 8.0), colour=(0.9, 0.3, 0.6))
rt.addLight(light)
imagesize = (800, 600)
data = rt.render(imagesize)
img = Image.fromstring("RGB", imagesize, data)
img.save('triangles_monkey.png')