Home » Archimedes archive » Archimedes World » AW-1996-11.adf » !VRMLeyes_AspexDem » !VRMLeyes/Docs/MakeMods

!VRMLeyes/Docs/MakeMods

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1996-11.adf » !VRMLeyes_AspexDem
Filename: !VRMLeyes/Docs/MakeMods
Read OK:
File size: 1A1F bytes
Load address: 0000
Exec address: 0000
File contents
VRMLEyes demonstration version will load the VRML files
supplied with the program, other VRML files will not be
recognised.

However, the demo version will allow users to create their
own shapes in the form of simple textfiles. The program 
will respond to commands for the following basic shapes:

Sphere / Cube / Cone / Cylinder 

These shapes are just a taster of VRML, and tiny part 
of what VRML has to offer. VRML is designed to
create entire 3D immersive and interactive worlds. 
As VRMLEyes develops it will support the richer behaviours 
of VRML 2 which include animation, Java scripting, 
3D sound, collisions and more.


A SIMPLE VRML FILE
~~~~~~~~~~~~~~~~~~
All VRML files consist of a header followed by some 
information about the model, a Sphere for example is
represented by the following text:

NOTE: VRMLEyes is case sensitive. 

EXAMPLE 1.   Sphere
~~~~~~~~~~~~~~~~~~~~

#VRML V1.0 ascii       # this is the header, it says
                       # to VRMLEyes; " get your pen out
                       # and get ready to start drawing" 

Sphere {
    radius 2.0
}                      # this is the first complete instruction
                       # it is telling VRML to draw a Sphere
                       # with a radius of 2 units

EXAMPLE 2.  Shading a shape using 'Materials' (add a bit of colour!).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can colour your shape how you like by including 
values (between 0 and 1) for each of the
colours Red, Green and Blue. 

There are several nodes (commands) used to colour an 
object diffuse, emmisive, specular, shininess, ambient 
and transparency. VRMLEyes recognises these nodes.

diffuseColor simply 'colours' the shape.

A red Sphere
~~~~~~~~~~~~

#VRML V1.0 ascii           # header must always come first

Material {                 # get ready to set a material
                           
diffuseColor 1.0 0.0 0.0   # select a color (max red, no green and no blue)

}                          # the shape will be this color
                           # watch out for spelling and case!
Sphere {                   # a sphere shape
    radius 2.0             # define radius
}                          # now draw the sphere, all red


Experiment with different colours:

Red     Green     Blue
1.0      0.0      0.0          (Pure red)
0.5      0.0      0.0          (dark red)
1.0      1.0      0.0          (Yellow)
1.0      0.0      1.0          (Magenta)

etc. 




The demo version also supports 'shininess'

Try amending the above example:
            
#VRML V1.0 ascii         
Material {               
diffuseColor 1.0 0.0 0.0
shininess    0.1            # make the object shiny, value between 0 and 0.5
}                        
Sphere {
    radius 2.0
}                           # now draw the sphere, in shiny red






Cube, Cylinder and Cone?
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Try writing new VRML textfiles to draw these other shapes on the screen.  

VRMLEyes demo version regognises the following style of commands:
Don't forget the headers etc.

To make a cube
~~~~~~~~~~~~~~
Cube {
   height 2.0
   width  4.0
   depth  6.0
}                           # make a cuboid 2x4x6 units

To make a Cylinder
~~~~~~~~~~~~~~~~~~
Cylinder {
   height 4.0
   radius 2.0
}                           # make a cylinder 4 units high and 4 wide

To make a Cone
~~~~~~~~~~~~~~

Cone {
    height       6.0
    bottomRadius 2.0
}                           # make a cone which is 6 units high with a base 4
                            # units wide)

NB.  You can use any units you wish. If you choose centimeters 
as your base then all other measurements in the complete model 
should be centimeters as well.



VRMLEyes can place your object accurately wherever desired.

PLACING A SHAPE
~~~~~~~~~~~~~~~
VRMLEyes can be told to move a shape using 
the 'Translation' node.

The Translation node can be used to place an 
object accurately anywhere in 3D space relative 
to the previous origin. This is achieved by defining 
a new position in the X, Y and Z planes.

First choose a scale, centimeters for example.

The following example draws one cube in 
the centre of the screen then draws a
second cube to sit on top of it.


#VRML V1.0 ascii                 # header

Cube {
  height 2.0                     # draw a cube 2x2x2 metres
  width  2.0
  depth  2.0
}
Translation {
    translation 0.0 2.0 0.0      # translate, or move, the point of origin                                    # 2 units up the Y axis.
                                 # if the number is -2 then the origin 
                                 # would be moved downward
}
Cube {
  height 2.0                     # Draw a second cube at the new origin
  width  2.0
  depth  2.0
}




ROTATING A SHAPE
~~~~~~~~~~~~~~~~
Each shape can be rotated by a specific amount 
in any direction. This function is controlled
by the Rotation Node. You will need to convert 
all your angles to radians before using them 
with VRML.




The following example describes a 'Cross' shape made from two cylinders. 

see example file 3.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#VRML V1.0 ascii   
Cylinder {
  height 30.0
  radius 2.0                          # draw a cylinder
}
Rotation {
    rotation  0.0 0.0 1.0 1.0472      # rotate the cylinder in the Z axis by 
                                      # 1.0472
                                      # radians (60 degrees). The figures
                                      # 0.0 0.0 1.0
                                      # represent the X, Y and Z axis. 
                                      # The Z axis is 
                                      # set with a '1' followed by the angle
                                      # in radians.
                                      # 0.0 1.0 0.0 1.0472 would rotate
                                      # the cylinder in the Y axis 
                                                                        
}
Cylinder {
  height 30.0
  radius 2.0
} 
      
                            
 ***This example produces intersecting shapes, so the Z Buffer 
will need to be used.                   

RADIANS
~~~~~~~
for those who can't remember:

rad = (deg / 180) x 3.142

                       Common angles:
                                       Degrees      Radians
                                       30 deg       0.524 rad
                                       60 deg       1.0472
                                       90 deg       1.571
                                       180 deg      3.142
                                       270 deg      4.172





 























00000000  0a 56 52 4d 4c 45 79 65  73 20 64 65 6d 6f 6e 73  |.VRMLEyes demons|
00000010  74 72 61 74 69 6f 6e 20  76 65 72 73 69 6f 6e 20  |tration version |
00000020  77 69 6c 6c 20 6c 6f 61  64 20 74 68 65 20 56 52  |will load the VR|
00000030  4d 4c 20 66 69 6c 65 73  0a 73 75 70 70 6c 69 65  |ML files.supplie|
00000040  64 20 77 69 74 68 20 74  68 65 20 70 72 6f 67 72  |d with the progr|
00000050  61 6d 2c 20 6f 74 68 65  72 20 56 52 4d 4c 20 66  |am, other VRML f|
00000060  69 6c 65 73 20 77 69 6c  6c 20 6e 6f 74 20 62 65  |iles will not be|
00000070  0a 72 65 63 6f 67 6e 69  73 65 64 2e 0a 0a 48 6f  |.recognised...Ho|
00000080  77 65 76 65 72 2c 20 74  68 65 20 64 65 6d 6f 20  |wever, the demo |
00000090  76 65 72 73 69 6f 6e 20  77 69 6c 6c 20 61 6c 6c  |version will all|
000000a0  6f 77 20 75 73 65 72 73  20 74 6f 20 63 72 65 61  |ow users to crea|
000000b0  74 65 20 74 68 65 69 72  0a 6f 77 6e 20 73 68 61  |te their.own sha|
000000c0  70 65 73 20 69 6e 20 74  68 65 20 66 6f 72 6d 20  |pes in the form |
000000d0  6f 66 20 73 69 6d 70 6c  65 20 74 65 78 74 66 69  |of simple textfi|
000000e0  6c 65 73 2e 20 54 68 65  20 70 72 6f 67 72 61 6d  |les. The program|
000000f0  20 0a 77 69 6c 6c 20 72  65 73 70 6f 6e 64 20 74  | .will respond t|
00000100  6f 20 63 6f 6d 6d 61 6e  64 73 20 66 6f 72 20 74  |o commands for t|
00000110  68 65 20 66 6f 6c 6c 6f  77 69 6e 67 20 62 61 73  |he following bas|
00000120  69 63 20 73 68 61 70 65  73 3a 0a 0a 53 70 68 65  |ic shapes:..Sphe|
00000130  72 65 20 2f 20 43 75 62  65 20 2f 20 43 6f 6e 65  |re / Cube / Cone|
00000140  20 2f 20 43 79 6c 69 6e  64 65 72 20 0a 0a 54 68  | / Cylinder ..Th|
00000150  65 73 65 20 73 68 61 70  65 73 20 61 72 65 20 6a  |ese shapes are j|
00000160  75 73 74 20 61 20 74 61  73 74 65 72 20 6f 66 20  |ust a taster of |
00000170  56 52 4d 4c 2c 20 61 6e  64 20 74 69 6e 79 20 70  |VRML, and tiny p|
00000180  61 72 74 20 0a 6f 66 20  77 68 61 74 20 56 52 4d  |art .of what VRM|
00000190  4c 20 68 61 73 20 74 6f  20 6f 66 66 65 72 2e 20  |L has to offer. |
000001a0  56 52 4d 4c 20 69 73 20  64 65 73 69 67 6e 65 64  |VRML is designed|
000001b0  20 74 6f 0a 63 72 65 61  74 65 20 65 6e 74 69 72  | to.create entir|
000001c0  65 20 33 44 20 69 6d 6d  65 72 73 69 76 65 20 61  |e 3D immersive a|
000001d0  6e 64 20 69 6e 74 65 72  61 63 74 69 76 65 20 77  |nd interactive w|
000001e0  6f 72 6c 64 73 2e 20 0a  41 73 20 56 52 4d 4c 45  |orlds. .As VRMLE|
000001f0  79 65 73 20 64 65 76 65  6c 6f 70 73 20 69 74 20  |yes develops it |
00000200  77 69 6c 6c 20 73 75 70  70 6f 72 74 20 74 68 65  |will support the|
00000210  20 72 69 63 68 65 72 20  62 65 68 61 76 69 6f 75  | richer behaviou|
00000220  72 73 20 0a 6f 66 20 56  52 4d 4c 20 32 20 77 68  |rs .of VRML 2 wh|
00000230  69 63 68 20 69 6e 63 6c  75 64 65 20 61 6e 69 6d  |ich include anim|
00000240  61 74 69 6f 6e 2c 20 4a  61 76 61 20 73 63 72 69  |ation, Java scri|
00000250  70 74 69 6e 67 2c 20 0a  33 44 20 73 6f 75 6e 64  |pting, .3D sound|
00000260  2c 20 63 6f 6c 6c 69 73  69 6f 6e 73 20 61 6e 64  |, collisions and|
00000270  20 6d 6f 72 65 2e 0a 0a  0a 41 20 53 49 4d 50 4c  | more....A SIMPL|
00000280  45 20 56 52 4d 4c 20 46  49 4c 45 0a 7e 7e 7e 7e  |E VRML FILE.~~~~|
00000290  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 0a 41  |~~~~~~~~~~~~~~.A|
000002a0  6c 6c 20 56 52 4d 4c 20  66 69 6c 65 73 20 63 6f  |ll VRML files co|
000002b0  6e 73 69 73 74 20 6f 66  20 61 20 68 65 61 64 65  |nsist of a heade|
000002c0  72 20 66 6f 6c 6c 6f 77  65 64 20 62 79 20 73 6f  |r followed by so|
000002d0  6d 65 20 0a 69 6e 66 6f  72 6d 61 74 69 6f 6e 20  |me .information |
000002e0  61 62 6f 75 74 20 74 68  65 20 6d 6f 64 65 6c 2c  |about the model,|
000002f0  20 61 20 53 70 68 65 72  65 20 66 6f 72 20 65 78  | a Sphere for ex|
00000300  61 6d 70 6c 65 20 69 73  0a 72 65 70 72 65 73 65  |ample is.represe|
00000310  6e 74 65 64 20 62 79 20  74 68 65 20 66 6f 6c 6c  |nted by the foll|
00000320  6f 77 69 6e 67 20 74 65  78 74 3a 0a 0a 4e 4f 54  |owing text:..NOT|
00000330  45 3a 20 56 52 4d 4c 45  79 65 73 20 69 73 20 63  |E: VRMLEyes is c|
00000340  61 73 65 20 73 65 6e 73  69 74 69 76 65 2e 20 0a  |ase sensitive. .|
00000350  0a 45 58 41 4d 50 4c 45  20 31 2e 20 20 20 53 70  |.EXAMPLE 1.   Sp|
00000360  68 65 72 65 0a 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |here.~~~~~~~~~~~|
00000370  7e 7e 7e 7e 7e 7e 7e 7e  7e 0a 0a 23 56 52 4d 4c  |~~~~~~~~~..#VRML|
00000380  20 56 31 2e 30 20 61 73  63 69 69 20 20 20 20 20  | V1.0 ascii     |
00000390  20 20 23 20 74 68 69 73  20 69 73 20 74 68 65 20  |  # this is the |
000003a0  68 65 61 64 65 72 2c 20  69 74 20 73 61 79 73 0a  |header, it says.|
000003b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000003c0  20 20 20 20 20 20 20 23  20 74 6f 20 56 52 4d 4c  |       # to VRML|
000003d0  45 79 65 73 3b 20 22 20  67 65 74 20 79 6f 75 72  |Eyes; " get your|
000003e0  20 70 65 6e 20 6f 75 74  0a 20 20 20 20 20 20 20  | pen out.       |
000003f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000400  23 20 61 6e 64 20 67 65  74 20 72 65 61 64 79 20  |# and get ready |
00000410  74 6f 20 73 74 61 72 74  20 64 72 61 77 69 6e 67  |to start drawing|
00000420  22 20 0a 0a 53 70 68 65  72 65 20 7b 0a 20 20 20  |" ..Sphere {.   |
00000430  20 72 61 64 69 75 73 20  32 2e 30 0a 7d 20 20 20  | radius 2.0.}   |
00000440  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000450  20 20 20 23 20 74 68 69  73 20 69 73 20 74 68 65  |   # this is the|
00000460  20 66 69 72 73 74 20 63  6f 6d 70 6c 65 74 65 20  | first complete |
00000470  69 6e 73 74 72 75 63 74  69 6f 6e 0a 20 20 20 20  |instruction.    |
00000480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000490  20 20 20 23 20 69 74 20  69 73 20 74 65 6c 6c 69  |   # it is telli|
000004a0  6e 67 20 56 52 4d 4c 20  74 6f 20 64 72 61 77 20  |ng VRML to draw |
000004b0  61 20 53 70 68 65 72 65  0a 20 20 20 20 20 20 20  |a Sphere.       |
000004c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000004d0  23 20 77 69 74 68 20 61  20 72 61 64 69 75 73 20  |# with a radius |
000004e0  6f 66 20 32 20 75 6e 69  74 73 0a 0a 45 58 41 4d  |of 2 units..EXAM|
000004f0  50 4c 45 20 32 2e 20 20  53 68 61 64 69 6e 67 20  |PLE 2.  Shading |
00000500  61 20 73 68 61 70 65 20  75 73 69 6e 67 20 27 4d  |a shape using 'M|
00000510  61 74 65 72 69 61 6c 73  27 20 28 61 64 64 20 61  |aterials' (add a|
00000520  20 62 69 74 20 6f 66 20  63 6f 6c 6f 75 72 21 29  | bit of colour!)|
00000530  2e 0a 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |..~~~~~~~~~~~~~~|
00000540  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |~~~~~~~~~~~~~~~~|
*
00000570  7e 7e 7e 7e 7e 7e 0a 0a  59 6f 75 20 63 61 6e 20  |~~~~~~..You can |
00000580  63 6f 6c 6f 75 72 20 79  6f 75 72 20 73 68 61 70  |colour your shap|
00000590  65 20 68 6f 77 20 79 6f  75 20 6c 69 6b 65 20 62  |e how you like b|
000005a0  79 20 69 6e 63 6c 75 64  69 6e 67 20 0a 76 61 6c  |y including .val|
000005b0  75 65 73 20 28 62 65 74  77 65 65 6e 20 30 20 61  |ues (between 0 a|
000005c0  6e 64 20 31 29 20 66 6f  72 20 65 61 63 68 20 6f  |nd 1) for each o|
000005d0  66 20 74 68 65 0a 63 6f  6c 6f 75 72 73 20 52 65  |f the.colours Re|
000005e0  64 2c 20 47 72 65 65 6e  20 61 6e 64 20 42 6c 75  |d, Green and Blu|
000005f0  65 2e 20 0a 0a 54 68 65  72 65 20 61 72 65 20 73  |e. ..There are s|
00000600  65 76 65 72 61 6c 20 6e  6f 64 65 73 20 28 63 6f  |everal nodes (co|
00000610  6d 6d 61 6e 64 73 29 20  75 73 65 64 20 74 6f 20  |mmands) used to |
00000620  63 6f 6c 6f 75 72 20 61  6e 20 0a 6f 62 6a 65 63  |colour an .objec|
00000630  74 20 64 69 66 66 75 73  65 2c 20 65 6d 6d 69 73  |t diffuse, emmis|
00000640  69 76 65 2c 20 73 70 65  63 75 6c 61 72 2c 20 73  |ive, specular, s|
00000650  68 69 6e 69 6e 65 73 73  2c 20 61 6d 62 69 65 6e  |hininess, ambien|
00000660  74 20 0a 61 6e 64 20 74  72 61 6e 73 70 61 72 65  |t .and transpare|
00000670  6e 63 79 2e 20 56 52 4d  4c 45 79 65 73 20 72 65  |ncy. VRMLEyes re|
00000680  63 6f 67 6e 69 73 65 73  20 74 68 65 73 65 20 6e  |cognises these n|
00000690  6f 64 65 73 2e 0a 0a 64  69 66 66 75 73 65 43 6f  |odes...diffuseCo|
000006a0  6c 6f 72 20 73 69 6d 70  6c 79 20 27 63 6f 6c 6f  |lor simply 'colo|
000006b0  75 72 73 27 20 74 68 65  20 73 68 61 70 65 2e 0a  |urs' the shape..|
000006c0  0a 41 20 72 65 64 20 53  70 68 65 72 65 0a 7e 7e  |.A red Sphere.~~|
000006d0  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 0a 0a 23 56 52 4d  |~~~~~~~~~~..#VRM|
000006e0  4c 20 56 31 2e 30 20 61  73 63 69 69 20 20 20 20  |L V1.0 ascii    |
000006f0  20 20 20 20 20 20 20 23  20 68 65 61 64 65 72 20  |       # header |
00000700  6d 75 73 74 20 61 6c 77  61 79 73 20 63 6f 6d 65  |must always come|
00000710  20 66 69 72 73 74 0a 0a  4d 61 74 65 72 69 61 6c  | first..Material|
00000720  20 7b 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | {              |
00000730  20 20 20 23 20 67 65 74  20 72 65 61 64 79 20 74  |   # get ready t|
00000740  6f 20 73 65 74 20 61 20  6d 61 74 65 72 69 61 6c  |o set a material|
00000750  0a 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00000760  20 20 20 20 20 20 20 20  20 20 20 20 0a 64 69 66  |            .dif|
00000770  66 75 73 65 43 6f 6c 6f  72 20 31 2e 30 20 30 2e  |fuseColor 1.0 0.|
00000780  30 20 30 2e 30 20 20 20  23 20 73 65 6c 65 63 74  |0 0.0   # select|
00000790  20 61 20 63 6f 6c 6f 72  20 28 6d 61 78 20 72 65  | a color (max re|
000007a0  64 2c 20 6e 6f 20 67 72  65 65 6e 20 61 6e 64 20  |d, no green and |
000007b0  6e 6f 20 62 6c 75 65 29  0a 0a 7d 20 20 20 20 20  |no blue)..}     |
000007c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000007d0  20 20 20 20 20 23 20 74  68 65 20 73 68 61 70 65  |     # the shape|
000007e0  20 77 69 6c 6c 20 62 65  20 74 68 69 73 20 63 6f  | will be this co|
000007f0  6c 6f 72 0a 20 20 20 20  20 20 20 20 20 20 20 20  |lor.            |
00000800  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 23  |               #|
00000810  20 77 61 74 63 68 20 6f  75 74 20 66 6f 72 20 73  | watch out for s|
00000820  70 65 6c 6c 69 6e 67 20  61 6e 64 20 63 61 73 65  |pelling and case|
00000830  21 0a 53 70 68 65 72 65  20 7b 20 20 20 20 20 20  |!.Sphere {      |
00000840  20 20 20 20 20 20 20 20  20 20 20 20 20 23 20 61  |             # a|
00000850  20 73 70 68 65 72 65 20  73 68 61 70 65 0a 20 20  | sphere shape.  |
00000860  20 20 72 61 64 69 75 73  20 32 2e 30 20 20 20 20  |  radius 2.0    |
00000870  20 20 20 20 20 20 20 20  20 23 20 64 65 66 69 6e  |         # defin|
00000880  65 20 72 61 64 69 75 73  0a 7d 20 20 20 20 20 20  |e radius.}      |
00000890  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000008a0  20 20 20 20 23 20 6e 6f  77 20 64 72 61 77 20 74  |    # now draw t|
000008b0  68 65 20 73 70 68 65 72  65 2c 20 61 6c 6c 20 72  |he sphere, all r|
000008c0  65 64 0a 0a 0a 45 78 70  65 72 69 6d 65 6e 74 20  |ed...Experiment |
000008d0  77 69 74 68 20 64 69 66  66 65 72 65 6e 74 20 63  |with different c|
000008e0  6f 6c 6f 75 72 73 3a 0a  0a 52 65 64 20 20 20 20  |olours:..Red    |
000008f0  20 47 72 65 65 6e 20 20  20 20 20 42 6c 75 65 0a  | Green     Blue.|
00000900  31 2e 30 20 20 20 20 20  20 30 2e 30 20 20 20 20  |1.0      0.0    |
00000910  20 20 30 2e 30 20 20 20  20 20 20 20 20 20 20 28  |  0.0          (|
00000920  50 75 72 65 20 72 65 64  29 0a 30 2e 35 20 20 20  |Pure red).0.5   |
00000930  20 20 20 30 2e 30 20 20  20 20 20 20 30 2e 30 20  |   0.0      0.0 |
00000940  20 20 20 20 20 20 20 20  20 28 64 61 72 6b 20 72  |         (dark r|
00000950  65 64 29 0a 31 2e 30 20  20 20 20 20 20 31 2e 30  |ed).1.0      1.0|
00000960  20 20 20 20 20 20 30 2e  30 20 20 20 20 20 20 20  |      0.0       |
00000970  20 20 20 28 59 65 6c 6c  6f 77 29 0a 31 2e 30 20  |   (Yellow).1.0 |
00000980  20 20 20 20 20 30 2e 30  20 20 20 20 20 20 31 2e  |     0.0      1.|
00000990  30 20 20 20 20 20 20 20  20 20 20 28 4d 61 67 65  |0          (Mage|
000009a0  6e 74 61 29 0a 0a 65 74  63 2e 20 0a 0a 0a 0a 0a  |nta)..etc. .....|
000009b0  54 68 65 20 64 65 6d 6f  20 76 65 72 73 69 6f 6e  |The demo version|
000009c0  20 61 6c 73 6f 20 73 75  70 70 6f 72 74 73 20 27  | also supports '|
000009d0  73 68 69 6e 69 6e 65 73  73 27 0a 0a 54 72 79 20  |shininess'..Try |
000009e0  61 6d 65 6e 64 69 6e 67  20 74 68 65 20 61 62 6f  |amending the abo|
000009f0  76 65 20 65 78 61 6d 70  6c 65 3a 0a 20 20 20 20  |ve example:.    |
00000a00  20 20 20 20 20 20 20 20  0a 23 56 52 4d 4c 20 56  |        .#VRML V|
00000a10  31 2e 30 20 61 73 63 69  69 20 20 20 20 20 20 20  |1.0 ascii       |
00000a20  20 20 0a 4d 61 74 65 72  69 61 6c 20 7b 20 20 20  |  .Material {   |
00000a30  20 20 20 20 20 20 20 20  20 20 20 20 0a 64 69 66  |            .dif|
00000a40  66 75 73 65 43 6f 6c 6f  72 20 31 2e 30 20 30 2e  |fuseColor 1.0 0.|
00000a50  30 20 30 2e 30 0a 73 68  69 6e 69 6e 65 73 73 20  |0 0.0.shininess |
00000a60  20 20 20 30 2e 31 20 20  20 20 20 20 20 20 20 20  |   0.1          |
00000a70  20 20 23 20 6d 61 6b 65  20 74 68 65 20 6f 62 6a  |  # make the obj|
00000a80  65 63 74 20 73 68 69 6e  79 2c 20 76 61 6c 75 65  |ect shiny, value|
00000a90  20 62 65 74 77 65 65 6e  20 30 20 61 6e 64 20 30  | between 0 and 0|
00000aa0  2e 35 0a 7d 20 20 20 20  20 20 20 20 20 20 20 20  |.5.}            |
00000ab0  20 20 20 20 20 20 20 20  20 20 20 20 0a 53 70 68  |            .Sph|
00000ac0  65 72 65 20 7b 0a 20 20  20 20 72 61 64 69 75 73  |ere {.    radius|
00000ad0  20 32 2e 30 0a 7d 20 20  20 20 20 20 20 20 20 20  | 2.0.}          |
00000ae0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000af0  20 23 20 6e 6f 77 20 64  72 61 77 20 74 68 65 20  | # now draw the |
00000b00  73 70 68 65 72 65 2c 20  69 6e 20 73 68 69 6e 79  |sphere, in shiny|
00000b10  20 72 65 64 0a 0a 0a 0a  0a 0a 0a 43 75 62 65 2c  | red.......Cube,|
00000b20  20 43 79 6c 69 6e 64 65  72 20 61 6e 64 20 43 6f  | Cylinder and Co|
00000b30  6e 65 3f 0a 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |ne?.~~~~~~~~~~~~|
00000b40  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 0a  |~~~~~~~~~~~~~~~.|
00000b50  54 72 79 20 77 72 69 74  69 6e 67 20 6e 65 77 20  |Try writing new |
00000b60  56 52 4d 4c 20 74 65 78  74 66 69 6c 65 73 20 74  |VRML textfiles t|
00000b70  6f 20 64 72 61 77 20 74  68 65 73 65 20 6f 74 68  |o draw these oth|
00000b80  65 72 20 73 68 61 70 65  73 20 6f 6e 20 74 68 65  |er shapes on the|
00000b90  20 73 63 72 65 65 6e 2e  20 20 0a 0a 56 52 4d 4c  | screen.  ..VRML|
00000ba0  45 79 65 73 20 64 65 6d  6f 20 76 65 72 73 69 6f  |Eyes demo versio|
00000bb0  6e 20 72 65 67 6f 67 6e  69 73 65 73 20 74 68 65  |n regognises the|
00000bc0  20 66 6f 6c 6c 6f 77 69  6e 67 20 73 74 79 6c 65  | following style|
00000bd0  20 6f 66 20 63 6f 6d 6d  61 6e 64 73 3a 0a 44 6f  | of commands:.Do|
00000be0  6e 27 74 20 66 6f 72 67  65 74 20 74 68 65 20 68  |n't forget the h|
00000bf0  65 61 64 65 72 73 20 65  74 63 2e 0a 0a 54 6f 20  |eaders etc...To |
00000c00  6d 61 6b 65 20 61 20 63  75 62 65 0a 7e 7e 7e 7e  |make a cube.~~~~|
00000c10  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 0a 43 75 62 65 20  |~~~~~~~~~~.Cube |
00000c20  7b 0a 20 20 20 68 65 69  67 68 74 20 32 2e 30 0a  |{.   height 2.0.|
00000c30  20 20 20 77 69 64 74 68  20 20 34 2e 30 0a 20 20  |   width  4.0.  |
00000c40  20 64 65 70 74 68 20 20  36 2e 30 0a 7d 20 20 20  | depth  6.0.}   |
00000c50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000c60  20 20 20 20 20 20 20 20  23 20 6d 61 6b 65 20 61  |        # make a|
00000c70  20 63 75 62 6f 69 64 20  32 78 34 78 36 20 75 6e  | cuboid 2x4x6 un|
00000c80  69 74 73 0a 0a 54 6f 20  6d 61 6b 65 20 61 20 43  |its..To make a C|
00000c90  79 6c 69 6e 64 65 72 0a  7e 7e 7e 7e 7e 7e 7e 7e  |ylinder.~~~~~~~~|
00000ca0  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 0a 43 79 6c 69 6e  |~~~~~~~~~~.Cylin|
00000cb0  64 65 72 20 7b 0a 20 20  20 68 65 69 67 68 74 20  |der {.   height |
00000cc0  34 2e 30 0a 20 20 20 72  61 64 69 75 73 20 32 2e  |4.0.   radius 2.|
00000cd0  30 0a 7d 20 20 20 20 20  20 20 20 20 20 20 20 20  |0.}             |
00000ce0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 23 20  |              # |
00000cf0  6d 61 6b 65 20 61 20 63  79 6c 69 6e 64 65 72 20  |make a cylinder |
00000d00  34 20 75 6e 69 74 73 20  68 69 67 68 20 61 6e 64  |4 units high and|
00000d10  20 34 20 77 69 64 65 0a  0a 54 6f 20 6d 61 6b 65  | 4 wide..To make|
00000d20  20 61 20 43 6f 6e 65 0a  7e 7e 7e 7e 7e 7e 7e 7e  | a Cone.~~~~~~~~|
00000d30  7e 7e 7e 7e 7e 7e 0a 0a  43 6f 6e 65 20 7b 0a 20  |~~~~~~..Cone {. |
00000d40  20 20 20 68 65 69 67 68  74 20 20 20 20 20 20 20  |   height       |
00000d50  36 2e 30 0a 20 20 20 20  62 6f 74 74 6f 6d 52 61  |6.0.    bottomRa|
00000d60  64 69 75 73 20 32 2e 30  0a 7d 20 20 20 20 20 20  |dius 2.0.}      |
00000d70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000d80  20 20 20 20 20 23 20 6d  61 6b 65 20 61 20 63 6f  |     # make a co|
00000d90  6e 65 20 77 68 69 63 68  20 69 73 20 36 20 75 6e  |ne which is 6 un|
00000da0  69 74 73 20 68 69 67 68  20 77 69 74 68 20 61 20  |its high with a |
00000db0  62 61 73 65 20 34 0a 20  20 20 20 20 20 20 20 20  |base 4.         |
00000dc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000dd0  20 20 20 23 20 75 6e 69  74 73 20 77 69 64 65 29  |   # units wide)|
00000de0  0a 0a 4e 42 2e 20 20 59  6f 75 20 63 61 6e 20 75  |..NB.  You can u|
00000df0  73 65 20 61 6e 79 20 75  6e 69 74 73 20 79 6f 75  |se any units you|
00000e00  20 77 69 73 68 2e 20 49  66 20 79 6f 75 20 63 68  | wish. If you ch|
00000e10  6f 6f 73 65 20 63 65 6e  74 69 6d 65 74 65 72 73  |oose centimeters|
00000e20  20 0a 61 73 20 79 6f 75  72 20 62 61 73 65 20 74  | .as your base t|
00000e30  68 65 6e 20 61 6c 6c 20  6f 74 68 65 72 20 6d 65  |hen all other me|
00000e40  61 73 75 72 65 6d 65 6e  74 73 20 69 6e 20 74 68  |asurements in th|
00000e50  65 20 63 6f 6d 70 6c 65  74 65 20 6d 6f 64 65 6c  |e complete model|
00000e60  20 0a 73 68 6f 75 6c 64  20 62 65 20 63 65 6e 74  | .should be cent|
00000e70  69 6d 65 74 65 72 73 20  61 73 20 77 65 6c 6c 2e  |imeters as well.|
00000e80  0a 0a 0a 0a 56 52 4d 4c  45 79 65 73 20 63 61 6e  |....VRMLEyes can|
00000e90  20 70 6c 61 63 65 20 79  6f 75 72 20 6f 62 6a 65  | place your obje|
00000ea0  63 74 20 61 63 63 75 72  61 74 65 6c 79 20 77 68  |ct accurately wh|
00000eb0  65 72 65 76 65 72 20 64  65 73 69 72 65 64 2e 0a  |erever desired..|
00000ec0  0a 50 4c 41 43 49 4e 47  20 41 20 53 48 41 50 45  |.PLACING A SHAPE|
00000ed0  0a 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |.~~~~~~~~~~~~~~~|
00000ee0  0a 56 52 4d 4c 45 79 65  73 20 63 61 6e 20 62 65  |.VRMLEyes can be|
00000ef0  20 74 6f 6c 64 20 74 6f  20 6d 6f 76 65 20 61 20  | told to move a |
00000f00  73 68 61 70 65 20 75 73  69 6e 67 20 0a 74 68 65  |shape using .the|
00000f10  20 27 54 72 61 6e 73 6c  61 74 69 6f 6e 27 20 6e  | 'Translation' n|
00000f20  6f 64 65 2e 0a 0a 54 68  65 20 54 72 61 6e 73 6c  |ode...The Transl|
00000f30  61 74 69 6f 6e 20 6e 6f  64 65 20 63 61 6e 20 62  |ation node can b|
00000f40  65 20 75 73 65 64 20 74  6f 20 70 6c 61 63 65 20  |e used to place |
00000f50  61 6e 20 0a 6f 62 6a 65  63 74 20 61 63 63 75 72  |an .object accur|
00000f60  61 74 65 6c 79 20 61 6e  79 77 68 65 72 65 20 69  |ately anywhere i|
00000f70  6e 20 33 44 20 73 70 61  63 65 20 72 65 6c 61 74  |n 3D space relat|
00000f80  69 76 65 20 0a 74 6f 20  74 68 65 20 70 72 65 76  |ive .to the prev|
00000f90  69 6f 75 73 20 6f 72 69  67 69 6e 2e 20 54 68 69  |ious origin. Thi|
00000fa0  73 20 69 73 20 61 63 68  69 65 76 65 64 20 62 79  |s is achieved by|
00000fb0  20 64 65 66 69 6e 69 6e  67 20 0a 61 20 6e 65 77  | defining .a new|
00000fc0  20 70 6f 73 69 74 69 6f  6e 20 69 6e 20 74 68 65  | position in the|
00000fd0  20 58 2c 20 59 20 61 6e  64 20 5a 20 70 6c 61 6e  | X, Y and Z plan|
00000fe0  65 73 2e 0a 0a 46 69 72  73 74 20 63 68 6f 6f 73  |es...First choos|
00000ff0  65 20 61 20 73 63 61 6c  65 2c 20 63 65 6e 74 69  |e a scale, centi|
00001000  6d 65 74 65 72 73 20 66  6f 72 20 65 78 61 6d 70  |meters for examp|
00001010  6c 65 2e 0a 0a 54 68 65  20 66 6f 6c 6c 6f 77 69  |le...The followi|
00001020  6e 67 20 65 78 61 6d 70  6c 65 20 64 72 61 77 73  |ng example draws|
00001030  20 6f 6e 65 20 63 75 62  65 20 69 6e 20 0a 74 68  | one cube in .th|
00001040  65 20 63 65 6e 74 72 65  20 6f 66 20 74 68 65 20  |e centre of the |
00001050  73 63 72 65 65 6e 20 74  68 65 6e 20 64 72 61 77  |screen then draw|
00001060  73 20 61 0a 73 65 63 6f  6e 64 20 63 75 62 65 20  |s a.second cube |
00001070  74 6f 20 73 69 74 20 6f  6e 20 74 6f 70 20 6f 66  |to sit on top of|
00001080  20 69 74 2e 0a 0a 0a 23  56 52 4d 4c 20 56 31 2e  | it....#VRML V1.|
00001090  30 20 61 73 63 69 69 20  20 20 20 20 20 20 20 20  |0 ascii         |
000010a0  20 20 20 20 20 20 20 20  23 20 68 65 61 64 65 72  |        # header|
000010b0  0a 0a 43 75 62 65 20 7b  0a 20 20 68 65 69 67 68  |..Cube {.  heigh|
000010c0  74 20 32 2e 30 20 20 20  20 20 20 20 20 20 20 20  |t 2.0           |
000010d0  20 20 20 20 20 20 20 20  20 20 23 20 64 72 61 77  |          # draw|
000010e0  20 61 20 63 75 62 65 20  32 78 32 78 32 20 6d 65  | a cube 2x2x2 me|
000010f0  74 72 65 73 0a 20 20 77  69 64 74 68 20 20 32 2e  |tres.  width  2.|
00001100  30 0a 20 20 64 65 70 74  68 20 20 32 2e 30 0a 7d  |0.  depth  2.0.}|
00001110  0a 54 72 61 6e 73 6c 61  74 69 6f 6e 20 7b 0a 20  |.Translation {. |
00001120  20 20 20 74 72 61 6e 73  6c 61 74 69 6f 6e 20 30  |   translation 0|
00001130  2e 30 20 32 2e 30 20 30  2e 30 20 20 20 20 20 20  |.0 2.0 0.0      |
00001140  23 20 74 72 61 6e 73 6c  61 74 65 2c 20 6f 72 20  |# translate, or |
00001150  6d 6f 76 65 2c 20 74 68  65 20 70 6f 69 6e 74 20  |move, the point |
00001160  6f 66 20 6f 72 69 67 69  6e 20 20 20 20 20 20 20  |of origin       |
00001170  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001180  20 20 20 20 20 20 20 20  20 20 20 20 20 23 20 32  |             # 2|
00001190  20 75 6e 69 74 73 20 75  70 20 74 68 65 20 59 20  | units up the Y |
000011a0  61 78 69 73 2e 0a 20 20  20 20 20 20 20 20 20 20  |axis..          |
000011b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000011c0  20 20 20 20 20 20 20 23  20 69 66 20 74 68 65 20  |       # if the |
000011d0  6e 75 6d 62 65 72 20 69  73 20 2d 32 20 74 68 65  |number is -2 the|
000011e0  6e 20 74 68 65 20 6f 72  69 67 69 6e 20 0a 20 20  |n the origin .  |
000011f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001200  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 23  |               #|
00001210  20 77 6f 75 6c 64 20 62  65 20 6d 6f 76 65 64 20  | would be moved |
00001220  64 6f 77 6e 77 61 72 64  0a 7d 0a 43 75 62 65 20  |downward.}.Cube |
00001230  7b 0a 20 20 68 65 69 67  68 74 20 32 2e 30 20 20  |{.  height 2.0  |
00001240  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001250  20 20 20 23 20 44 72 61  77 20 61 20 73 65 63 6f  |   # Draw a seco|
00001260  6e 64 20 63 75 62 65 20  61 74 20 74 68 65 20 6e  |nd cube at the n|
00001270  65 77 20 6f 72 69 67 69  6e 0a 20 20 77 69 64 74  |ew origin.  widt|
00001280  68 20 20 32 2e 30 0a 20  20 64 65 70 74 68 20 20  |h  2.0.  depth  |
00001290  32 2e 30 0a 7d 0a 0a 0a  0a 0a 52 4f 54 41 54 49  |2.0.}.....ROTATI|
000012a0  4e 47 20 41 20 53 48 41  50 45 0a 7e 7e 7e 7e 7e  |NG A SHAPE.~~~~~|
000012b0  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 0a 45 61 63 68  |~~~~~~~~~~~.Each|
000012c0  20 73 68 61 70 65 20 63  61 6e 20 62 65 20 72 6f  | shape can be ro|
000012d0  74 61 74 65 64 20 62 79  20 61 20 73 70 65 63 69  |tated by a speci|
000012e0  66 69 63 20 61 6d 6f 75  6e 74 20 0a 69 6e 20 61  |fic amount .in a|
000012f0  6e 79 20 64 69 72 65 63  74 69 6f 6e 2e 20 54 68  |ny direction. Th|
00001300  69 73 20 66 75 6e 63 74  69 6f 6e 20 69 73 20 63  |is function is c|
00001310  6f 6e 74 72 6f 6c 6c 65  64 0a 62 79 20 74 68 65  |ontrolled.by the|
00001320  20 52 6f 74 61 74 69 6f  6e 20 4e 6f 64 65 2e 20  | Rotation Node. |
00001330  59 6f 75 20 77 69 6c 6c  20 6e 65 65 64 20 74 6f  |You will need to|
00001340  20 63 6f 6e 76 65 72 74  20 0a 61 6c 6c 20 79 6f  | convert .all yo|
00001350  75 72 20 61 6e 67 6c 65  73 20 74 6f 20 72 61 64  |ur angles to rad|
00001360  69 61 6e 73 20 62 65 66  6f 72 65 20 75 73 69 6e  |ians before usin|
00001370  67 20 74 68 65 6d 20 0a  77 69 74 68 20 56 52 4d  |g them .with VRM|
00001380  4c 2e 0a 0a 0a 0a 0a 54  68 65 20 66 6f 6c 6c 6f  |L......The follo|
00001390  77 69 6e 67 20 65 78 61  6d 70 6c 65 20 64 65 73  |wing example des|
000013a0  63 72 69 62 65 73 20 61  20 27 43 72 6f 73 73 27  |cribes a 'Cross'|
000013b0  20 73 68 61 70 65 20 6d  61 64 65 20 66 72 6f 6d  | shape made from|
000013c0  20 74 77 6f 20 63 79 6c  69 6e 64 65 72 73 2e 20  | two cylinders. |
000013d0  0a 0a 73 65 65 20 65 78  61 6d 70 6c 65 20 66 69  |..see example fi|
000013e0  6c 65 20 33 2e 0a 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |le 3..~~~~~~~~~~|
000013f0  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |~~~~~~~~~~~~~~~~|
*
00001430  7e 0a 0a 23 56 52 4d 4c  20 56 31 2e 30 20 61 73  |~..#VRML V1.0 as|
00001440  63 69 69 20 20 20 0a 43  79 6c 69 6e 64 65 72 20  |cii   .Cylinder |
00001450  7b 0a 20 20 68 65 69 67  68 74 20 33 30 2e 30 0a  |{.  height 30.0.|
00001460  20 20 72 61 64 69 75 73  20 32 2e 30 20 20 20 20  |  radius 2.0    |
00001470  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001480  20 20 20 20 20 20 23 20  64 72 61 77 20 61 20 63  |      # draw a c|
00001490  79 6c 69 6e 64 65 72 0a  7d 0a 52 6f 74 61 74 69  |ylinder.}.Rotati|
000014a0  6f 6e 20 7b 0a 20 20 20  20 72 6f 74 61 74 69 6f  |on {.    rotatio|
000014b0  6e 20 20 30 2e 30 20 30  2e 30 20 31 2e 30 20 31  |n  0.0 0.0 1.0 1|
000014c0  2e 30 34 37 32 20 20 20  20 20 20 23 20 72 6f 74  |.0472      # rot|
000014d0  61 74 65 20 74 68 65 20  63 79 6c 69 6e 64 65 72  |ate the cylinder|
000014e0  20 69 6e 20 74 68 65 20  5a 20 61 78 69 73 20 62  | in the Z axis b|
000014f0  79 20 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |y .             |
00001500  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001510  20 20 20 20 20 20 20 20  20 23 20 31 2e 30 34 37  |         # 1.047|
00001520  32 0a 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |2.              |
00001530  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001540  20 20 20 20 20 20 20 20  23 20 72 61 64 69 61 6e  |        # radian|
00001550  73 20 28 36 30 20 64 65  67 72 65 65 73 29 2e 20  |s (60 degrees). |
00001560  54 68 65 20 66 69 67 75  72 65 73 0a 20 20 20 20  |The figures.    |
00001570  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001590  20 20 23 20 30 2e 30 20  30 2e 30 20 31 2e 30 0a  |  # 0.0 0.0 1.0.|
000015a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000015c0  20 20 20 20 20 20 23 20  72 65 70 72 65 73 65 6e  |      # represen|
000015d0  74 20 74 68 65 20 58 2c  20 59 20 61 6e 64 20 5a  |t the X, Y and Z|
000015e0  20 61 78 69 73 2e 20 0a  20 20 20 20 20 20 20 20  | axis. .        |
000015f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001600  20 20 20 20 20 20 20 20  20 20 20 20 20 20 23 20  |              # |
00001610  54 68 65 20 5a 20 61 78  69 73 20 69 73 20 0a 20  |The Z axis is . |
00001620  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001640  20 20 20 20 20 23 20 73  65 74 20 77 69 74 68 20  |     # set with |
00001650  61 20 27 31 27 20 66 6f  6c 6c 6f 77 65 64 20 62  |a '1' followed b|
00001660  79 20 74 68 65 20 61 6e  67 6c 65 0a 20 20 20 20  |y the angle.    |
00001670  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001690  20 20 23 20 69 6e 20 72  61 64 69 61 6e 73 2e 0a  |  # in radians..|
000016a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000016c0  20 20 20 20 20 20 23 20  30 2e 30 20 31 2e 30 20  |      # 0.0 1.0 |
000016d0  30 2e 30 20 31 2e 30 34  37 32 20 77 6f 75 6c 64  |0.0 1.0472 would|
000016e0  20 72 6f 74 61 74 65 0a  20 20 20 20 20 20 20 20  | rotate.        |
000016f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001700  20 20 20 20 20 20 20 20  20 20 20 20 20 20 23 20  |              # |
00001710  74 68 65 20 63 79 6c 69  6e 64 65 72 20 69 6e 20  |the cylinder in |
00001720  74 68 65 20 59 20 61 78  69 73 20 0a 20 20 20 20  |the Y axis .    |
00001730  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001770  20 20 20 20 0a 7d 0a 43  79 6c 69 6e 64 65 72 20  |    .}.Cylinder |
00001780  7b 0a 20 20 68 65 69 67  68 74 20 33 30 2e 30 0a  |{.  height 30.0.|
00001790  20 20 72 61 64 69 75 73  20 32 2e 30 0a 7d 20 0a  |  radius 2.0.} .|
000017a0  20 20 20 20 20 20 0a 20  20 20 20 20 20 20 20 20  |      .         |
000017b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000017c0  20 20 20 0a 20 2a 2a 2a  54 68 69 73 20 65 78 61  |   . ***This exa|
000017d0  6d 70 6c 65 20 70 72 6f  64 75 63 65 73 20 69 6e  |mple produces in|
000017e0  74 65 72 73 65 63 74 69  6e 67 20 73 68 61 70 65  |tersecting shape|
000017f0  73 2c 20 73 6f 20 74 68  65 20 5a 20 42 75 66 66  |s, so the Z Buff|
00001800  65 72 20 0a 77 69 6c 6c  20 6e 65 65 64 20 74 6f  |er .will need to|
00001810  20 62 65 20 75 73 65 64  2e 20 20 20 20 20 20 20  | be used.       |
00001820  20 20 20 20 20 20 20 20  20 20 20 20 0a 0a 52 41  |            ..RA|
00001830  44 49 41 4e 53 0a 7e 7e  7e 7e 7e 7e 7e 0a 66 6f  |DIANS.~~~~~~~.fo|
00001840  72 20 74 68 6f 73 65 20  77 68 6f 20 63 61 6e 27  |r those who can'|
00001850  74 20 72 65 6d 65 6d 62  65 72 3a 0a 0a 72 61 64  |t remember:..rad|
00001860  20 3d 20 28 64 65 67 20  2f 20 31 38 30 29 20 78  | = (deg / 180) x|
00001870  20 33 2e 31 34 32 0a 0a  20 20 20 20 20 20 20 20  | 3.142..        |
00001880  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 43  |               C|
00001890  6f 6d 6d 6f 6e 20 61 6e  67 6c 65 73 3a 0a 20 20  |ommon angles:.  |
000018a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000018c0  20 20 20 20 20 44 65 67  72 65 65 73 20 20 20 20  |     Degrees    |
000018d0  20 20 52 61 64 69 61 6e  73 0a 20 20 20 20 20 20  |  Radians.      |
000018e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001900  20 33 30 20 64 65 67 20  20 20 20 20 20 20 30 2e  | 30 deg       0.|
00001910  35 32 34 20 72 61 64 0a  20 20 20 20 20 20 20 20  |524 rad.        |
00001920  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001930  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 36  |               6|
00001940  30 20 64 65 67 20 20 20  20 20 20 20 31 2e 30 34  |0 deg       1.04|
00001950  37 32 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |72.             |
00001960  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001970  20 20 20 20 20 20 20 20  20 20 39 30 20 64 65 67  |          90 deg|
00001980  20 20 20 20 20 20 20 31  2e 35 37 31 0a 20 20 20  |       1.571.   |
00001990  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000019b0  20 20 20 20 31 38 30 20  64 65 67 20 20 20 20 20  |    180 deg     |
000019c0  20 33 2e 31 34 32 0a 20  20 20 20 20 20 20 20 20  | 3.142.         |
000019d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000019e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 32 37  |              27|
000019f0  30 20 64 65 67 20 20 20  20 20 20 34 2e 31 37 32  |0 deg      4.172|
00001a00  0a 0a 0a 0a 0a 0a 20 0a  0a 0a 0a 0a 0a 0a 0a 0a  |...... .........|
00001a10  0a 0a 0a 0a 0a 0a 0a 0a  0a 0a 0a 0a 0a 0a 0a     |...............|
00001a1f