Pacman Exercise
#PacMan Code
Display "myfirstrib.tiff" "file" "rgb"
Projection "perspective" "fov" 30
Translate 0 0 5
color [0 1 1]
LightSource "pointlight"
"from" [2 2 -3]
"intensity" [5]
WorldBegin
AttributeBegin
color[1 1 0]
rotate 40 0 0 1
Disk 0.5 1 270
AttributeEnd
AttributeBegin
color[0 0 0]
translate -0.01 0.36 -2
Disk 1.5 0.1 360
AttributeEnd
AttributeBegin
color[1 1 1]
translate 1 -0.05 0
Disk 0.5 0.07 360
AttributeEnd
AttributeBegin
color[1 1 1]
translate 1.3 -0.05 0
Disk 0.5 0.07 360
AttributeEnd
AttributeBegin
color[1 1 1]
translate 0.5 -0.05 0
Disk 0.5 0.07 360
AttributeEnd
AttributeBegin
color[1 1 1]
translate 0.75 -0.05 0
Disk 0.5 0.07 360
AttributeEnd
WorldEnd
# MUSHROOM 1UP Exercise
#Mushroom Code
Display "myfirstrib.tiff" "file" "rgb"
Projection "perspective" "fov" 30
Translate 0 0 5
LightSource "pointlight"
"from" [2 2 -2]
"intensity" [10]
WorldBegin
#Mushroom Head
AttributeBegin
color 0 1 0
scale 0.87 0.75 1
sphere 1.0 0.5 1 360
AttributeEnd
#Face
AttributeBegin
color 0.95 0.89 0.47
translate 0 -0.5 0
scale 0.4 0.3 0.4
rotate 90 1 0 0
cylinder 1 -0.5 1 360
AttributeEnd
#BG
AttributeBegin
color 1 1 1
translate 0 0 -1
scale 10 10 10
sphere 1.0 0.5 1 360
AttributeEnd
#left Eye
AttributeBegin
color 0.1 0.1 0.1
translate -0.15 -0.45 -1.5
scale 0.04 0.08 0.075
sphere 1 0.5 1 360
AttributeEnd
#Right Eye
AttributeBegin
color 0.1 0.1 0.1
translate 0.15 -0.45 -1.5
scale 0.04 0.08 0.07
sphere 1 0.5 1 360
AttributeEnd
#Middle Circle on head
AttributeBegin
color 1 1 1
translate 0 0.1 0
scale 0.35 0.35 0.35
sphere 1 0.5 1 360
AttributeEnd
#Right Circle
AttributeBegin
color 1 1 1
translate 0.62 0 0.2
scale 0.15 0.3 0.3
sphere 1 0.5 1 360
AttributeEnd
#Left Circle
AttributeBegin
color 1 1 1
translate -0.62 0 0.2
scale 0.15 0.3 0.3
sphere 1 0.5 1 360
AttributeEnd
WorldEnd

No comments:
Post a Comment