26 mat1.setReflectivity(0.0) |
26 mat1.setReflectivity(0.0) |
27 box2 = Box(L=(-20.0, -20.0, -10.0), H=(20.0, 20.0, -12.0), material=mat1) |
27 box2 = Box(L=(-20.0, -20.0, -10.0), H=(20.0, 20.0, -12.0), material=mat1) |
28 rt.addshape(box2) |
28 rt.addshape(box2) |
29 |
29 |
30 light = Light(position=(-5.0, 3.0, 10.0), colour=(0.9, 0.3, 0.6)) |
30 light = Light(position=(-5.0, 3.0, 10.0), colour=(0.9, 0.3, 0.6)) |
|
31 #light.castshadows(0) |
31 rt.addlight(light) |
32 rt.addlight(light) |
32 |
33 |
33 light2 = Light(position=(4.0, 1.0, 10.0), colour=(0.2, 0.9, 0.5)) |
34 light2 = Light(position=(4.0, 1.0, 10.0), colour=(0.2, 0.9, 0.5)) |
|
35 #light2.castshadows(0) |
34 rt.addlight(light2) |
36 rt.addlight(light2) |
35 |
37 |
36 imagesize = (800, 600) |
38 imagesize = (800, 600) |
37 data = rt.render(imagesize) |
39 data = rt.render(imagesize) |
38 img = Image.fromstring("RGB", imagesize, data) |
40 img = Image.fromstring("RGB", imagesize, data) |