demos/spheres_ao.py
branchpyrit
changeset 96 9eb71e76c7fd
parent 95 ca7d4c665531
equal deleted inserted replaced
95:ca7d4c665531 96:9eb71e76c7fd
    19 mat0 = Material(colour=(0.7, 0.7, 0.7))
    19 mat0 = Material(colour=(0.7, 0.7, 0.7))
    20 box = Box(L=(-20.0, -1.2, -20.0), H=(20.0, -1.0, 20.0), material=mat0)
    20 box = Box(L=(-20.0, -1.2, -20.0), H=(20.0, -1.0, 20.0), material=mat0)
    21 rt.addShape(box)
    21 rt.addShape(box)
    22 
    22 
    23 mat1 = Material(colour=(1.0, 0.0, 0.0))
    23 mat1 = Material(colour=(1.0, 0.0, 0.0))
    24 bigsphere = Sphere(centre=(3.0, 2.0, -7.0), radius=3.0, material=mat1)
    24 bigsphere = Sphere(center=(3.0, 2.0, -7.0), radius=3.0, material=mat1)
    25 rt.addShape(bigsphere)
    25 rt.addShape(bigsphere)
    26 
    26 
    27 mat2 = Material(colour=(0.0, 1.0, 0.0))
    27 mat2 = Material(colour=(0.0, 1.0, 0.0))
    28 smallsphere = Sphere(centre=(-5.5, 1.5, -8.0), radius=2.0, material=mat2)
    28 smallsphere = Sphere(center=(-5.5, 1.5, -8.0), radius=2.0, material=mat2)
    29 rt.addShape(smallsphere)
    29 rt.addShape(smallsphere)
    30 
    30 
    31 mat3 = Material(colour=(0.0, 0.0, 1.0))
    31 mat3 = Material(colour=(0.0, 0.0, 1.0))
    32 tinysphere = Sphere(centre=(-1.2, 0.0, -2.0), radius=0.5, material=mat3)
    32 tinysphere = Sphere(center=(-1.2, 0.0, -2.0), radius=0.5, material=mat3)
    33 rt.addShape(tinysphere)
    33 rt.addShape(tinysphere)
    34 
    34 
    35 top.optimize()
    35 top.optimize()
    36 
    36 
    37 sampler = DefaultSampler(800, 600)
    37 sampler = DefaultSampler(800, 600)