File: example-4a.rib

package info (click to toggle)
lg-issue15 2-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 1,448 kB
  • ctags: 122
  • sloc: ansic: 113; makefile: 30; sh: 3
file content (42 lines) | stat: -rw-r--r-- 1,040 bytes parent folder | download | duplicates (4)
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
#########################################
# Working Example 1b for Linux Gazette
# By Paul M. Sargent (8th Feb 1997)
#########################################

# First we setup the output file 
Display "Example_1b.tiff" "file" "rgb"

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

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

# Move the camera into position
Identity
Translate 0 0 10

# Start Describing the Scene
WorldBegin

# Add the Lightsources
  LightSource "spotlight" 1 "from" [1 3 -4] "to" [0 0 0] "intensity" 15
  LightSource "spotlight" 1 "from" [-4 4 -1] "to" [0 0 0] "intensity" 15
  
# Start our first object
    Sphere 1 1 -1 360

# Put a Floor in.
    Patch "bilinear" "P" [-5 -1 -10  
                           5 -1 -10  
  			  -5 -1  5  
			   5 -1  5]
# And a Back Wall  
    Patch "bilinear" "P" [-5  10  5 
                           5  10  5  
  			  -5 -1   5  
			   5 -1   5]
# Finished
WorldEnd