demos/dragon.py
branchpyrit
changeset 69 303583d2fb97
parent 62 07c2f8084719
child 75 20dee9819b17
equal deleted inserted replaced
68:2c154aad7f33 69:303583d2fb97
     7 from plyreader import LoadStanfordPlyFile
     7 from plyreader import LoadStanfordPlyFile
     8 import Image
     8 import Image
     9 
     9 
    10 rt = Raytracer()
    10 rt = Raytracer()
    11 mat = Material(colour=(0.9, 0.9, 0.9))
    11 mat = Material(colour=(0.9, 0.9, 0.9))
       
    12 mat.setSmooth(True)
    12 LoadStanfordPlyFile(rt, "../models/ply/dragon/dragon_vrip_res2.ply",
    13 LoadStanfordPlyFile(rt, "../models/ply/dragon/dragon_vrip_res2.ply",
    13 	mat, smooth=True, scale=(-29.0, 29.0, -29.0), trans=(0.0, -3.6, 0.0))
    14 	mat, scale=(-29.0, 29.0, -29.0), trans=(0.0, -3.6, 0.0))
    14 
    15 
    15 light1 = Light(position=(-5.0, 2.0, 8.0), colour=(0.9, 0.3, 0.2))
    16 light1 = Light(position=(-5.0, 2.0, 8.0), colour=(0.9, 0.3, 0.2))
    16 rt.addlight(light1)
    17 rt.addlight(light1)
    17 
    18 
    18 light2 = Light(position=(3.0, 0.0, 9.0), colour=(0.0, 1.0, 0.2))
    19 light2 = Light(position=(3.0, 0.0, 9.0), colour=(0.0, 1.0, 0.2))