demos/triangles_sphere.py
branchpyrit
changeset 62 07c2f8084719
parent 60 a23b5089b9c3
child 75 20dee9819b17
equal deleted inserted replaced
61:7006036eb0db 62:07c2f8084719
     4 from objreader import LoadWavefrontObjFile
     4 from objreader import LoadWavefrontObjFile
     5 import Image
     5 import Image
     6 
     6 
     7 rt = Raytracer()
     7 rt = Raytracer()
     8 mat = Material(colour=(0.9, 0.9, 0.9))
     8 mat = Material(colour=(0.9, 0.9, 0.9))
     9 LoadWavefrontObjFile(rt, "sphere.obj", mat, 1.5)
     9 LoadWavefrontObjFile(rt, "../models/obj/sphere.obj", mat, 1.5)
    10 
    10 
    11 light1 = Light(position=(0.0, 2.0, 6.0), colour=(0.9, 0.3, 0.6))
    11 light1 = Light(position=(0.0, 2.0, 6.0), colour=(0.9, 0.3, 0.6))
    12 light1.castshadows(False);
    12 light1.castshadows(False);
    13 rt.addlight(light1)
    13 rt.addlight(light1)
    14 
    14