demos/bunny.py
branchpyrit
changeset 34 28f6e8b9d5d1
parent 31 b4e09433934a
child 38 5d043eeb09d9
equal deleted inserted replaced
33:83d0200d4c09 34:28f6e8b9d5d1
    16 mat = Material(colour=(0.9, 0.9, 0.9))
    16 mat = Material(colour=(0.9, 0.9, 0.9))
    17 mat.setTransmissivity(0.8)
    17 mat.setTransmissivity(0.8)
    18 LoadStanfordPlyFile(rt, "../models/bunny/bun_zipper.ply",
    18 LoadStanfordPlyFile(rt, "../models/bunny/bun_zipper.ply",
    19 	mat, smooth=True, scale=(-29.0, 29.0, 29.0), trans=(-1,-2.5,-3))
    19 	mat, smooth=True, scale=(-29.0, 29.0, 29.0), trans=(-1,-2.5,-3))
    20 
    20 
    21 mat0 = Material(colour=(0.1, 0.2, 0.9))
    21 mat0 = Material(colour=(0.1, 0.2, 1.0))
    22 box1 = Box(L=(-20.0, -1.7, -20.0), H=(20.0, -1.5, 20.0), material=mat0)
    22 box1 = Box(L=(-20.0, -1.7, -20.0), H=(20.0, -1.5, 20.0), material=mat0)
    23 rt.addshape(box1)
    23 rt.addshape(box1)
    24 
    24 
    25 mat1 = Material(colour=(0.2, 0.8, 0.4))
    25 mat1 = Material(colour=(0.5, 0.2, 0.1))
    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))