equal
deleted
inserted
replaced
24 |
24 |
25 rt = Raytracer() |
25 rt = Raytracer() |
26 mat = Material(colour=(0.9, 0.9, 0.9)) |
26 mat = Material(colour=(0.9, 0.9, 0.9)) |
27 LoadWavefrontObjFile(rt, mat, "monkey.obj") |
27 LoadWavefrontObjFile(rt, mat, "monkey.obj") |
28 |
28 |
29 light = Light(position=(-5.0, 2.0, -8.0), colour=(0.9, 0.3, 0.6)) |
29 light = Light(position=(-5.0, 2.0, 8.0), colour=(0.9, 0.3, 0.6)) |
30 rt.addlight(light) |
30 rt.addlight(light) |
31 |
31 |
32 imagesize = (800, 600) |
32 imagesize = (800, 600) |
33 data = rt.render(imagesize) |
33 data = rt.render(imagesize) |
34 img = Image.fromstring("RGB", imagesize, data) |
34 img = Image.fromstring("RGB", imagesize, data) |