home *** CD-ROM | disk | FTP | other *** search
/ Chestnut's Multimedia Mania / MM_MANIA.ISO / graphics / povscn20 / axisbox.inc < prev    next >
Text File  |  1993-09-27  |  3KB  |  98 lines

  1. // Persistence Of Vision raytracer version 2.0 sample file.
  2.  
  3. // Include file for steiner.pov, grafbic.pov
  4. // by Alexander Enzmann
  5.  
  6. // Declare the sizes of cylinders that represent coordinate axes 
  7. #declare Axes_X_Radii = <1.0, 0.01, 0.01>
  8. #declare Axes_Y_Radii = <0.01, 1.0, 0.01>
  9. #declare Axes_Z_Radii = <0.01, 0.01, 1.0>
  10.  
  11. // Define the colors of the coordinate axes 
  12. #declare X_Axis_Color = color green 1 blue 1
  13. #declare Y_Axis_Color = color red 1 green 1
  14. #declare Z_Axis_Color = color red 1 blue 1
  15.  
  16. // Define the ways that the coordinate axes can be translated 
  17. #declare Translate_X_Axis_Up       = < 0.0,  1.0,  0.0>
  18. #declare Translate_X_Axis_Down     = < 0.0, -1.0,  0.0>
  19. #declare Translate_X_Axis_Forward  = < 0.0,  0.0,  1.0>
  20. #declare Translate_X_Axis_Back     = < 0.0,  0.0, -1.0>
  21. #declare Translate_Y_Axis_Left     = < 1.0,  0.0,  0.0>
  22. #declare Translate_Y_Axis_Right    = <-1.0,  0.0,  0.0>
  23. #declare Translate_Y_Axis_Forward  = < 0.0,  0.0,  1.0>
  24. #declare Translate_Y_Axis_Back     = < 0.0,  0.0, -1.0>
  25. #declare Translate_Z_Axis_Up       = < 0.0,  1.0,  0.0>
  26. #declare Translate_Z_Axis_Down     = < 0.0, -1.0,  0.0>
  27. #declare Translate_Z_Axis_Left     = < 1.0,  0.0,  0.0>
  28. #declare Translate_Z_Axis_Right    = <-1.0,  0.0,  0.0>
  29.  
  30. // Define coordinate axes 
  31. #declare Axes =
  32. union {
  33.    object {
  34.       Cylinder_X
  35.       scale Axes_X_Radii
  36.       texture { pigment { X_Axis_Color } }
  37.    }
  38.  
  39.    object {
  40.       Cylinder_Y
  41.       scale Axes_Y_Radii
  42.       texture { pigment { Y_Axis_Color } }
  43.    }
  44.    object {
  45.       Cylinder_Z
  46.       scale Axes_Z_Radii
  47.       texture { pigment { Z_Axis_Color } }
  48.    }
  49. }
  50.  
  51. // Translate the axis up, down, right, ...,  to form the three
  52. // planes that divide the standard octants. 
  53. #declare Axis_Box =
  54. union {
  55.    object {
  56.       Cylinder_X
  57.       scale Axes_X_Radii
  58.       translate Translate_X_Axis_Up
  59.       texture { pigment { X_Axis_Color } }
  60.    }
  61.  
  62.    object {
  63.       Cylinder_X
  64.       scale Axes_X_Radii
  65.       translate Translate_X_Axis_Down
  66.       texture { pigment { X_Axis_Color } }
  67.    }
  68.  
  69.    object {
  70.       Cylinder_Y
  71.       scale Axes_Y_Radii
  72.       translate Translate_Y_Axis_Forward
  73.       texture { pigment { color Y_Axis_Color } }
  74.    }
  75.  
  76.    object {
  77.       Cylinder_Y
  78.       scale Axes_Y_Radii
  79.       translate Translate_Y_Axis_Back
  80.       texture { pigment { Y_Axis_Color } }
  81.    }
  82.  
  83.    object {
  84.       Cylinder_Z
  85.       scale Axes_Z_Radii
  86.       translate Translate_Z_Axis_Left
  87.       texture { pigment { Z_Axis_Color } }
  88.    }
  89.  
  90.    object {
  91.       Cylinder_Z
  92.       scale Axes_Z_Radii
  93.       translate Translate_Z_Axis_Right
  94.       texture { pigment { Z_Axis_Color } }
  95.    }
  96. }
  97.  
  98.