demos/buddha.py
branchpyrit
changeset 30 33f95441790e
parent 29 574c34441a1c
child 38 5d043eeb09d9
equal deleted inserted replaced
29:574c34441a1c 30:33f95441790e
    10 from plyreader import LoadStanfordPlyFile
    10 from plyreader import LoadStanfordPlyFile
    11 import Image
    11 import Image
    12 
    12 
    13 rt = Raytracer()
    13 rt = Raytracer()
    14 mat = Material(colour=(0.9, 0.9, 0.9))
    14 mat = Material(colour=(0.9, 0.9, 0.9))
    15 LoadStanfordPlyFile(rt, "../models/happy/happy_vrip_res2.ply",
    15 LoadStanfordPlyFile(rt, "../models/happy/happy_vrip_res4.ply",
    16 	mat, smooth=True, scale=20.0, trans=(-3,0,0))
    16 	mat, smooth=True, scale=20.0, trans=(0,-3,0))
    17 
    17 
    18 light = Light(position=(-5.0, 2.0, 8.0), colour=(0.9, 0.3, 0.6))
    18 light = Light(position=(-5.0, 2.0, 8.0), colour=(0.9, 0.3, 0.6))
    19 rt.addlight(light)
    19 rt.addlight(light)
    20 
    20 
    21 imagesize = (800, 600)
    21 imagesize = (800, 600)