home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / scripts / pov / piggy.pov < prev    next >
Encoding:
Text File  |  1993-05-05  |  3.4 KB  |  149 lines

  1. // PIGGY BANK
  2.  
  3. #include "colors.inc"
  4. #include "textures.inc"
  5. #include "shapes.inc"
  6.  
  7. // CAMERA
  8. camera {
  9.     location        <0 0 -7.5>
  10.     direction       <0 0 1>
  11.     up              <0 1 0>
  12.     right           <1.33 0 0>
  13.     look_at         <0 0 5>
  14. }
  15.  
  16. // LIGHT_SOURCE
  17. object {
  18.  light_source{< -5 5 -10> color White }
  19. }
  20.  
  21. // BACKGROUND PLANES
  22. object  {
  23.  plane  { <0 0 1> 12 }
  24.          texture { color White}}
  25. object  {
  26.  plane  { <0 1 0 > -2 }
  27.          texture { Jade
  28.          reflection .5}}
  29.  
  30. // PIGGY OBJECT
  31. #declare piggy = object {
  32.  union  {
  33. //  BODY
  34.   quadric { Ellipsoid 
  35.               scale <2 1.5 1.5> }
  36. //  HEAD
  37.   quadric { Ellipsoid 
  38.             scale <1 1 1>
  39.             translate <-2.2 0 0> }
  40. //  LEFT CHEEK
  41.   quadric { Ellipsoid
  42.             scale <.5 .5 .5>
  43.             translate <-2.2 -.35 -.65> }
  44. //  RIGHT CHEEK
  45.   quadric { Ellipsoid
  46.             scale <.5 .5 .5>
  47.             translate <-2.2 -.35 .65> }
  48. // RIGHT EYE
  49.   quadric { Ellipsoid
  50.             scale <.2 .2 .2>
  51.             translate <-2.7 -.2 .75> }
  52. // LEFT EYE
  53.   quadric { Ellipsoid
  54.             scale <.2 .2 .2>
  55.             translate <-2.7 -.2 -.75> }
  56. //  LEFT FRONT LEG 
  57.  intersection {
  58.    intersection {
  59.     quadric {QCone_Y}
  60.     plane {<0 1 0> -1.75}
  61.     plane {<0 1 0> -3.25  inverse}   } 
  62.    scale < .25  1  .25 >
  63.    rotate <  180   0   0 >
  64.    translate < -.8 -3.5 -.4 > }
  65. //  RIGHT FRONT LEG 
  66.  intersection {
  67.    intersection {
  68.     quadric {QCone_Y}
  69.     plane {<0 1 0> -1.75}
  70.     plane {<0 1 0> -3.25  inverse}} 
  71.    scale < .25  1  .25 >
  72.    rotate <  180   0   0 >
  73.    translate < -.8 -3.5 .4 >}
  74. //  LEFT REAR LEG 
  75.  intersection {
  76.    intersection {
  77.     quadric {QCone_Y}
  78.     plane {<0 1 0> -1.75}
  79.     plane {<0 1 0> -3.5  inverse}} 
  80.    scale < .25  1  .25 >
  81.    rotate <180 0 0 >
  82.    translate <.8 -3.5 -.4 >}
  83. //  RIGHT REAR LEG 
  84.  intersection {
  85.    intersection {
  86.     quadric {QCone_Y}
  87.     plane {<0 1 0> -1.75}
  88.     plane {<0 1 0> -3.5  inverse}} 
  89.    scale <.25 1 .25 >
  90.    rotate <180 0 0 >
  91.    translate <.8 -3.5 .4 >}
  92. //  SNOUT
  93.  intersection {
  94.   intersection {
  95.    quadric {Cylinder_Y}
  96.    plane {<0.0 1.0 0.0> -.5 inverse}
  97.    plane {<0.0 1.0 0.0> 1.25}}
  98.    scale < .375  .9  .375 >
  99.    rotate <  0   0   135 >
  100.    translate < -2.2 0 0 >}
  101. //  LEFT EAR
  102.  difference {
  103.   intersection {
  104.    intersection {
  105.     quadric {QCone_Y}
  106.     plane {<0 1 0> 0}
  107.     plane {<0 1 0> -1 inverse}}
  108.    scale <.25 1 .25>
  109.    translate <-2.2 1.25 -.7>}
  110.   intersection {
  111.    intersection {
  112.     quadric {Cylinder_Y}
  113.     plane {<0 1 0> 0 inverse}
  114.     plane {<0 1 0> -1}}
  115.     scale < .25  1  .25 >
  116.     translate < -2.45 1.25 -.7>}}
  117. //  RIGHT EAR
  118.  difference {
  119.   intersection {
  120.    intersection {
  121.     quadric {QCone_Y}
  122.     plane {<0 1 0> 0}
  123.     plane {<0 1 0> -1 inverse}}
  124.    scale <.25 1 .25>
  125.    translate <-2.2 1.25 .7>}
  126.   intersection {
  127.    intersection {
  128.     quadric {Cylinder_Y}
  129.     plane {<0 1 0> 0 inverse}
  130.     plane {<0 1 0> -1}}
  131.     scale < .25  1  .25 >
  132.     translate < -2.45 1.25 .7>}}
  133. //  TAIL
  134.   intersection {
  135.    quadric { Cylinder_Z
  136.              scale <2 2 2>}
  137.    plane { <0 0 1> 10}
  138.    plane { <0 0 -1> 0}
  139.    quartic {<0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.1666 0 1 0
  140.              0 0 0 0 0 0 0 .5 0 -1 0 0 0 0 0 >}
  141.    scale <.1 .1 .1>
  142.    rotate <0 -90 45>
  143.    translate <2.15 1 0>}}
  144.  texture {colour red 1 green 0.749020 blue 0.749020
  145.           phong .5}}
  146.  
  147. // DRAW THE PIG
  148. object {piggy rotate <0 -30 0> rotate <0 0 0> translate <0 0 0>}
  149.