#VRML V1.0 ascii

# Check rendering with an SoSpotLight.
# NB: turn off the headlight in the viewer when viewing this file.
#
# 19990423 mortene

Separator {
   Switch {
      whichChild -1
      DEF coord Coordinate3 {
	point [ 0 0 0, 1 0 0, 2 0 0, 3 0 0, 4 0 0, 5 0 0, 6 0 0, 7 0 0,
	    8 0 0, 9 0 0, 0 1 0, 1 1 0, 2 1 0, 3 1 0, 4 1 0, 5 1 0,
	    6 1 0, 7 1 0, 8 1 0, 9 1 0, 0 2 0, 1 2 0, 2 2 0, 3 2 0,
	    4 2 0, 5 2 0, 6 2 0, 7 2 0, 8 2 0, 9 2 0, 0 3 0, 1 3 0,
	    2 3 0, 3 3 0, 4 3 0, 5 3 0, 6 3 0, 7 3 0, 8 3 0, 9 3 0,
	    0 4 0, 1 4 0, 2 4 0, 3 4 0, 4 4 0, 5 4 0, 6 4 0, 7 4 0,
	    8 4 0, 9 4 0, 0 5 0, 1 5 0, 2 5 0, 3 5 0, 4 5 0, 5 5 0,
	    6 5 0, 7 5 0, 8 5 0, 9 5 0, 0 6 0, 1 6 0, 2 6 0, 3 6 0,
	    4 6 0, 5 6 0, 6 6 0, 7 6 0, 8 6 0, 9 6 0, 0 7 0, 1 7 0,
	    2 7 0, 3 7 0, 4 7 0, 5 7 0, 6 7 0, 7 7 0, 8 7 0, 9 7 0,
	    0 8 0, 1 8 0, 2 8 0, 3 8 0, 4 8 0, 5 8 0, 6 8 0, 7 8 0,
	    8 8 0, 9 8 0, 0 9 0, 1 9 0, 2 9 0, 3 9 0, 4 9 0, 5 9 0,
	    6 9 0, 7 9 0, 8 9 0, 9 9 0 ]
      }
      DEF faceset IndexedFaceSet {
	coordIndex [ 0, 1, 11, 10, -1, 1, 2, 12,
	    11, -1, 2, 3, 13, 12, -1, 3,
	    4, 14, 13, -1, 4, 5, 15, 14,
	    -1, 5, 6, 16, 15, -1, 6, 7,
	    17, 16, -1, 7, 8, 18, 17, -1,
	    8, 9, 19, 18, -1, 10, 11, 21,
	    20, -1, 11, 12, 22, 21, -1, 12,
	    13, 23, 22, -1, 13, 14, 24, 23,
	    -1, 14, 15, 25, 24, -1, 15, 16,
	    26, 25, -1, 16, 17, 27, 26, -1,
	    17, 18, 28, 27, -1, 18, 19, 29,
	    28, -1, 20, 21, 31, 30, -1, 21,
	    22, 32, 31, -1, 22, 23, 33, 32,
	    -1, 23, 24, 34, 33, -1, 24, 25,
	    35, 34, -1, 25, 26, 36, 35, -1,
	    26, 27, 37, 36, -1, 27, 28, 38,
	    37, -1, 28, 29, 39, 38, -1, 30,
	    31, 41, 40, -1, 31, 32, 42, 41,
	    -1, 32, 33, 43, 42, -1, 33, 34,
	    44, 43, -1, 34, 35, 45, 44, -1,
	    35, 36, 46, 45, -1, 36, 37, 47,
	    46, -1, 37, 38, 48, 47, -1, 38,
	    39, 49, 48, -1, 40, 41, 51, 50,
	    -1, 41, 42, 52, 51, -1, 42, 43,
	    53, 52, -1, 43, 44, 54, 53, -1,
	    44, 45, 55, 54, -1, 45, 46, 56,
	    55, -1, 46, 47, 57, 56, -1, 47,
	    48, 58, 57, -1, 48, 49, 59, 58,
	    -1, 50, 51, 61, 60, -1, 51, 52,
	    62, 61, -1, 52, 53, 63, 62, -1,
	    53, 54, 64, 63, -1, 54, 55, 65,
	    64, -1, 55, 56, 66, 65, -1, 56,
	    57, 67, 66, -1, 57, 58, 68, 67,
	    -1, 58, 59, 69, 68, -1, 60, 61,
	    71, 70, -1, 61, 62, 72, 71, -1,
	    62, 63, 73, 72, -1, 63, 64, 74,
	    73, -1, 64, 65, 75, 74, -1, 65,
	    66, 76, 75, -1, 66, 67, 77, 76,
	    -1, 67, 68, 78, 77, -1, 68, 69,
	    79, 78, -1, 70, 71, 81, 80, -1,
	    71, 72, 82, 81, -1, 72, 73, 83,
	    82, -1, 73, 74, 84, 83, -1, 74,
	    75, 85, 84, -1, 75, 76, 86, 85,
	    -1, 76, 77, 87, 86, -1, 77, 78,
	    88, 87, -1, 78, 79, 89, 88, -1,
	    80, 81, 91, 90, -1, 81, 82, 92,
	    91, -1, 82, 83, 93, 92, -1, 83,
	    84, 94, 93, -1, 84, 85, 95, 94,
	    -1, 85, 86, 96, 95, -1, 86, 87,
	    97, 96, -1, 87, 88, 98, 97, -1,
	    88, 89, 99, 98, -1 ]
      }
   }

   # ROW 0 -- different locations
   Translation { translation 0 +10 0 }
   Separator {
      Material { diffuseColor 1 0 0 }
      Separator {
	 SpotLight { }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 0 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { location -4 -4 1 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { location 4 -4 1}
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 0 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { location 4 4 1 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { location -4 4 1 }
	 USE coord
         USE faceset
      }
  }

   # ROW 1 -- misc field settings
   Translation { translation 0 +12 0 }
   Separator {
      Material { diffuseColor 1 0 0 }
      Separator {
	 SpotLight { on FALSE }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { intensity 0.8 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { intensity 0.5 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { intensity 0.2 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { color 1 0 0 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 0 0 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { color 1 0 0 }
	 USE coord
         USE faceset
      }
   }

   # ROW 3 -- try different direction vectors
   Translation { translation 0 +12 0 }
   Separator {
      Material { diffuseColor 1 0 0 }
      Separator {
	 SpotLight { direction 0 -1 -1 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { direction 0 1 -1 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { direction -1 0 -1 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 0 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { direction 1 0 -1 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 0 0 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { direction -1 -1 -1 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 0 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight { direction 1 1 -1 }
	 USE coord
         USE faceset
      }
   }

   # ROW 4 -- try different dropoff rates
   Translation { translation 0 +12 0 }
   Separator {
      Material { diffuseColor 1 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    dropOffRate 0.0
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    dropOffRate 0.015
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 0 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    dropOffRate 0.025
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    dropOffRate 0.050
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 0 1 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    dropOffRate 0.2
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 0 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    dropOffRate 1.0
	 }
	 USE coord
         USE faceset
      }
   }

   # ROW 5 -- try different cutOffAngle values
   Translation { translation 0 +12 0 }
   Separator {
      Material { diffuseColor 1 0 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 3.141592653589793  # pi
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 0 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 1.5707963267948966  # pi/2
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 1.0471975511965976  # pi/3
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 0 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 0.7853981633974483  # pi/4
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 0 0 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 0.6283185307179586  # pi/5
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 0.5235987755982988  # pi/6
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 0 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 0.39269908169872414  # pi/8
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 0.19634954084936207  # pi/16
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 0 1 0 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 0.04908738521234052  # pi/64
	 }
	 USE coord
         USE faceset
      }

      Material { diffuseColor 1 0 1 }
      Translation { translation +12 0 0 }
      Separator {
	 SpotLight {
	    direction 0 -1 -1
	    cutOffAngle 0.0
	 }
	 USE coord
         USE faceset
      }
   }
}
