demos/buddha.py
branchpyrit
changeset 75 20dee9819b17
parent 69 303583d2fb97
child 90 f6a72eb99631
equal deleted inserted replaced
74:09aedbf5f95f 75:20dee9819b17
    12 mat.setSmooth(True)
    12 mat.setSmooth(True)
    13 LoadStanfordPlyFile(rt, "../models/ply/happy/happy_vrip_res2.ply",
    13 LoadStanfordPlyFile(rt, "../models/ply/happy/happy_vrip_res2.ply",
    14 	mat, scale=20.0, trans=(0,-3,0))
    14 	mat, scale=20.0, trans=(0,-3,0))
    15 
    15 
    16 light = Light(position=(-5.0, 2.0, 8.0), colour=(0.9, 0.3, 0.6))
    16 light = Light(position=(-5.0, 2.0, 8.0), colour=(0.9, 0.3, 0.6))
    17 rt.addlight(light)
    17 rt.addLight(light)
    18 
    18 
    19 imagesize = (800, 600)
    19 imagesize = (800, 600)
    20 data = rt.render(imagesize)
    20 data = rt.render(imagesize)
    21 img = Image.fromstring("RGB", imagesize, data)
    21 img = Image.fromstring("RGB", imagesize, data)
    22 img.save('buddha.png')
    22 img.save('buddha.png')