home *** CD-ROM | disk | FTP | other *** search
/ Computerspiele Selbermachen / computerspieleselbermachen.iso / pov / shapes.inc < prev    next >
Text File  |  1993-05-25  |  3KB  |  150 lines

  1. // Persistence Of Vision Raytracer 2.0
  2. // Standard shapes include file.
  3.  
  4. #declare Shapes_Inc_Temp = version
  5.  
  6. #version 2.0
  7.  
  8. /*
  9.  
  10. NOTE: This collection of standard shapes has been around since the days
  11. of DKB-Trace and early versions of POV-Ray.  Those versions had no
  12. optomized primatives for planes, cones, disks etc.  Some of the definitions
  13. below may seem trivial or unnecessary given the new POV-Ray 2.0 object
  14. primatives.  We have retained these objects for compatibility with
  15. earlier versions.
  16.  
  17. NOTE:  With the release of POV-Ray 1.0, some of these shapes, in particular, 
  18. the "Disk_?" group, were changed from an earlier beta test and DKB-Trace
  19. styly.  The file "shapes.old" is also included in this package for 
  20. compatibility with pre-1.0 scenes.
  21.  
  22. */
  23.  
  24.  
  25. #declare Ellipsoid =
  26.  sphere {<0, 0, 0>,1}
  27.  
  28. #declare Sphere =
  29.  sphere {<0, 0, 0>,1}
  30.  
  31. #declare Cylinder_X =
  32.  quadric
  33.   {<0, 1, 1>,
  34.    <0, 0, 0>,
  35.    <0, 0, 0>, -1
  36.   }
  37.  
  38. #declare Cylinder_Y =
  39.  quadric
  40.   {<1, 0, 1>,
  41.    <0, 0, 0>,
  42.    <0, 0, 0>, -1
  43.   }
  44.  
  45. #declare Cylinder_Z =
  46.  quadric
  47.   {<1, 1, 0>,
  48.    <0, 0, 0>,
  49.    <0, 0, 0>, -1
  50.   }
  51.  
  52. // Infinite cones
  53. #declare QCone_X =
  54.  quadric
  55.   {<-1, 1, 1>,
  56.    < 0, 0, 0>,
  57.    < 0, 0, 0>, 0
  58.   }
  59.  
  60. #declare QCone_Y =
  61.  quadric
  62.   {<1, -1, 1>,
  63.    <0, 0, 0>,
  64.    <0, 0, 0>, 0
  65.   }
  66.  
  67. #declare QCone_Z =
  68.  quadric
  69.   {<1, 1, -1>,
  70.    <0, 0, 0>,
  71.    <0, 0, 0>, 0
  72.   }
  73.  
  74. // Unit cones    
  75. // The Cone_n objects were formerly defined as intersections of
  76. // quadrics and boxes but now can be redefined with the cone primative.
  77.  
  78. #declare Cone_X = cone {x,0,-x,1}
  79. #declare Cone_Y = cone {y,0,-y,1}
  80. #declare Cone_Z = cone {z,0,-z,1}
  81.  
  82. // The Plane_nn objects were formerly defined as quadrics but now can
  83. // be redefined as a plane.
  84.  
  85. #declare Plane_YZ = plane {x,0}
  86. #declare Plane_XZ = plane {y,0}
  87. #declare Plane_XY = plane {z,0}
  88.  
  89. /* y^2 + z^2 - x = 0 */
  90. #declare Paraboloid_X =
  91.  quadric
  92.   {< 0, 1, 1>,
  93.    < 0, 0, 0>,
  94.    <-1, 0, 0>, 0
  95.   }
  96.  
  97. /* x^2 + z^2 - y = 0 */
  98. #declare Paraboloid_Y =
  99.  quadric
  100.   {<1,  0,  1>,
  101.    <0,  0,  0>,
  102.    <0, -1,  0>, 0
  103.   }
  104.  
  105. /* x^2 + y^2 - z = 0 */
  106. #declare Paraboloid_Z =
  107.  quadric
  108.   {<1,  1,  0>,
  109.    <0,  0,  0>,
  110.    <0,  0, -1>, 0
  111.   }
  112.  
  113. /* y - x^2 + z^2 = 0 */
  114. #declare Hyperboloid =
  115.  quadric
  116.   {<-1,  0,  1>,
  117.    < 0,  0,  0>,
  118.    < 0,  1,  0>, 0
  119.   }
  120.  
  121. #declare Hyperboloid_Y =
  122.  quadric                 /* Vertical hyperboloid */
  123.   {<1, -1,  1>,          /*                      */
  124.    <0,  0,  0>,          /*            \   /     */
  125.    <0,  0,  0>, -1       /* Like this:  ) (      */
  126.   }                      /*            /   \     */
  127.  
  128. // Cube using the procedural box primitive
  129. #declare UnitBox = box { <-1, -1, -1>, <1, 1, 1> }
  130.  
  131. // This primitive used to be an intersection of six planes.  For speed,
  132. // it is now a box and nothing else.
  133. #declare Cube = box { <-1, -1, -1>, <1, 1, 1> }
  134.  
  135. // The Disk primitives are "capped" cylinders of unit length.
  136. //
  137. // They are now "unit" size, the same as a sphere with a radius of 1.
  138. // They will now scale evenly in all directions.
  139.  
  140. #declare Disk_X =    /* Capped cylinder, Length in x axis */
  141.  cylinder { x,-x,1}
  142.  
  143. #declare Disk_Y =    /* Capped cylinder, Length in y axis */
  144.  cylinder { y,-y,1}
  145.  
  146. #declare Disk_Z =    /* Capped cylinder, Length in z axis */
  147.  cylinder { z,-z,1}
  148.  
  149. #version Shapes_Inc_Temp 
  150.