File: wireframe2.rib

package info (click to toggle)
lg-issue17 4-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,472 kB
  • ctags: 184
  • sloc: makefile: 36; sh: 4
file content (87 lines) | stat: -rw-r--r-- 2,125 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#########################################
# Test RIB for checking shaders
# By Michael J. Hammel March 1997
#########################################

# First we setup the output file 
Display "wireframe2.tif" "file" "rgb"

# Then set the x & y resolution of the image and the pixel aspect
# ratio (1 = square pixels)
Format 320 240 1

# We now setup the camera (projection type and field of view)
Projection "perspective" "fov" 35

# Move the world 16 units away from the camera and position it
# so the view is to the left of the camera and down from the cameras
# point of view.
Translate 0 0 16 

#
# Off-white ambient light, not very intense, to make sure everything 
# gets lit just a little.
#
LightSource "ambientlight" 1 
         "intensity" 0.03 "lightcolor" [0.7 0.7 0.7]

TransformBegin

# Our first (and only) frame....
FrameBegin 1

WorldBegin

   #
   # Distant lights directly in front of and just off to both sides of
   # our cylinder.
   #
   TransformBegin
      Rotate -25 0 1 0
      LightSource "distantlight" 3 
         "intensity" 0.825 "lightcolor" [1 1 1]
   TransformEnd
   TransformBegin
      Rotate 25 0 1 0
      LightSource "distantlight" 3 
         "intensity" 0.625 "lightcolor" [1 1 1]
   TransformEnd
   TransformBegin
      LightSource "distantlight" 3 
         "intensity" 0.425 "lightcolor" [1 1 1]
   TransformEnd

   # The plane with a crossed tile pattern - used as a backdrop
   TransformBegin
      Translate -.6 -.5 0
      Scale 2.5 2.5 1
      AttributeBegin
         Color [ 0.7 0.7 0.7 ]
         Surface "crosstile"
         TransformBegin
            Scale 2 2.5 2
            Patch "bilinear" "P"
               [-0.5  0.5 0
                 0.5  0.5 0
                -0.5 -0.5 0
                 0.5 -0.5 0]  
         TransformEnd
      AttributeEnd
   TransformEnd

   # The sphere with a wire framed surface
   TransformBegin
      Translate -.6 -.5 -2.0
      Scale 2.5 2.5 1
      Rotate 90 1 0 0
      AttributeBegin
         Color [ 1.0 0.5 0.5 ]
         Surface "RCScreen"
         Sphere 1 -1 1 360 
      AttributeEnd
   TransformEnd


WorldEnd

FrameEnd