home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / scripts / polyray / pots / crocpot.pi next >
Encoding:
Text File  |  1993-06-27  |  3.8 KB  |  112 lines

  1. // "Crocpot" a Polyray 1.6 scene file based on the "Utah Teapot"
  2. // By Douglas Otwell
  3. //----------------------------------------------------------------------------
  4. // In Crocpot, I use a simple ramp function to displace the pot like little
  5. // pyramids, somewhat reminiscent of a crocodile's hide.  The displacement 
  6. // follows the beziers of the pot by using u and v, the bezier's local
  7. // coordinates. The texture makes use of Polyray's radial texturing ability.
  8. //----------------------------------------------------------------------------
  9.  
  10. // point these to the standard Polyray include files
  11. include "../colors.inc"
  12. include "../texture.inc"
  13.  
  14. viewpoint {
  15.    from <0, 5, -6>
  16.    at <0,1,0>
  17.    up <0,1,0>
  18.    angle 45
  19.    resolution 640, 480
  20.    aspect 1.33333
  21.    }
  22.  
  23. background skyblue
  24. light <10, 10, -5>
  25. light <-10, 6, -15>
  26.  
  27. define gator_green <0, 0.25, 0>
  28.  
  29. define gator_texture texture {
  30.    noise surface {
  31.       ambient gator_green, 0.2
  32.       diffuse gator_green, 0.6
  33.       position_fn position_radial
  34.       lookup_fn lookup_sawtooth 
  35.       octaves 3
  36.       turbulence 0.05
  37.       ambient 0.3
  38.       diffuse 0.6
  39.       specular white, 0.6
  40.       microfacet Reitz 6
  41.       color_map(
  42.          [0.000, 0.050, gator_green, black]
  43.          [0.050, 0.075, black,       gator_green]
  44.          [0.075, 0.125, gator_green, gator_green]
  45.          [0.125, 0.150, gator_green, black]
  46.          [0.150, 0.175, black,       gator_green]
  47.          [0.175, 0.200, gator_green, gator_green]
  48.          [0.200, 0.225, gator_green, gator_green]
  49.          [0.225, 0.250, gator_green, black]
  50.          [0.250, 0.275, black,       gator_green]
  51.          [0.275, 0.300, gator_green, gator_green]
  52.          [0.300, 0.325, gator_green, gator_green]
  53.          [0.325, 0.350, gator_green, black]
  54.          [0.350, 0.375, black,       gator_green]
  55.          [0.375, 0.400, gator_green, gator_green]
  56.          [0.400, 0.425, gator_green, gator_green]
  57.          [0.425, 0.450, gator_green, black]
  58.          [0.450, 0.475, black,       gator_green]
  59.          [0.475, 0.500, gator_green, gator_green]
  60.          [0.500, 0.525, gator_green, gator_green]
  61.          [0.525, 0.550, gator_green, black]
  62.          [0.550, 0.575, black,       gator_green]
  63.          [0.575, 0.600, gator_green, gator_green]
  64.          [0.600, 0.625, gator_green, gator_green]
  65.          [0.625, 0.650, gator_green, black]
  66.          [0.650, 0.675, black,       gator_green]
  67.          [0.675, 0.700, gator_green, gator_green]
  68.          [0.700, 0.725, gator_green, gator_green]
  69.          [0.725, 0.750, gator_green, black]
  70.          [0.750, 0.775, black,       gator_green]
  71.          [0.775, 0.800, gator_green, gator_green]
  72.          [0.800, 0.825, gator_green, gator_green]
  73.          [0.825, 0.850, gator_green, black]
  74.          [0.850, 0.875, black,       gator_green]
  75.          [0.875, 0.900, gator_green, gator_green]
  76.          [0.900, 0.925, gator_green, gator_green]
  77.          [0.925, 0.950, gator_green, black]
  78.          [0.950, 0.975, black,       gator_green]
  79.          [0.975, 1.000, gator_green, gator_green]
  80.       )
  81.    }
  82. }
  83.  
  84. define rim_texture    gator_texture
  85. define body1_texture  gator_texture
  86. define body2_texture  gator_texture
  87. define spout_texture  gator_texture
  88. define handle_texture gator_texture
  89. define lid1_texture   gator_texture 
  90. define lid2_texture   gator_texture
  91. define bottom_texture gator_texture
  92.  
  93. define gator_fn  (sawtooth(8*v)/2 + sawtooth(6*u)/2) * 0.125 * N
  94. define gator_fn2 (sawtooth(12*v)/2 + sawtooth(9*u)/2) * 0.15 * N
  95.  
  96. define body1_fn  gator_fn
  97. define body2_fn  gator_fn
  98. define rim_fn    gator_fn
  99. define lid1_fn   gator_fn2
  100. define lid2_fn   gator_fn 
  101. define spout_fn  gator_fn2
  102. define handle_fn gator_fn2
  103. define bottom_fn gator_fn
  104.  
  105. define u_res 6
  106. define v_res 6
  107. include "mypot.inc"
  108.  
  109. teapot
  110.  
  111.  
  112.