demos/spheres_ao.py
branchpyrit
changeset 21 79b516a3803d
parent 19 4e0955fca797
child 22 76b7bd51d64a
equal deleted inserted replaced
20:f22952603f29 21:79b516a3803d
     5 
     5 
     6 from raytracer import Raytracer, Material, Box, Sphere, Light
     6 from raytracer import Raytracer, Material, Box, Sphere, Light
     7 import Image
     7 import Image
     8 
     8 
     9 rt = Raytracer()
     9 rt = Raytracer()
    10 rt.ambientocclusion(samples=60, distance=6.0, angle=0.5)
    10 rt.ambientocclusion(samples=100, distance=16.0, angle=0.5)
    11 
    11 
    12 light1 = Light(position=(0.0, 5.0, -5.0), colour=(0.7, 0.3, 0.6))
    12 light1 = Light(position=(0.0, 5.0, -5.0), colour=(0.7, 0.3, 0.6))
    13 light1.castshadows(False)
    13 light1.castshadows(False)
    14 rt.addlight(light1)
    14 rt.addlight(light1)
    15 
    15