home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / misc / axis1.pov next >
Text File  |  1997-12-12  |  3KB  |  133 lines

  1. #include "colors.inc"
  2. #include "textures.inc"
  3. #include "shapes.inc"
  4. #include "color.inc"
  5.  
  6. #global_settings {
  7.   assumed_gamma 2.2
  8. }
  9.  
  10. camera {
  11.   location <1.65, 2.5, -4.5>
  12.   right 4/3*x
  13.   direction 1.85*z
  14.   look_at <1, 0.85, 0>
  15. }
  16.  
  17. light_source { <100,  20, -10> color White }
  18. light_source { <-100, 100, -100> color White }
  19.  
  20. //fog { distance 50 color Gray25 }
  21.  
  22. plane { y, -0.05 texture { T0 } }
  23.  
  24. #declare Cone_Len = 0.15
  25. #declare Cone_Diam = 0.08
  26. #declare Cyl_Len = 1
  27. #declare Cyl_Diam = 0.05
  28. #declare W_O = <0,0,0>
  29.  
  30. #declare X = union {
  31.     sphere { <-0.5, 1, 0>, Cyl_Diam }
  32.     sphere { < 0.5, 1, 0>, Cyl_Diam }
  33.     sphere { <-0.5, 0, 0>, Cyl_Diam }
  34.     sphere { < 0.5, 0, 0>, Cyl_Diam }
  35.     cylinder { <-0.5, 1, 0> <0.5, 0, 0>, Cyl_Diam }
  36.     cylinder { <-0.5, 0, 0> <0.5, 1, 0>, Cyl_Diam }
  37.     scale 0.5
  38. }
  39. #declare Y = union {
  40.     sphere { <-0.5, 1, 0>, Cyl_Diam }
  41.     sphere { < 0.5, 1, 0>, Cyl_Diam }
  42.     sphere { < 0.0, 0.5, 0>, Cyl_Diam }
  43.     sphere { < 0.0, 0.0, 0>, Cyl_Diam }
  44.     cylinder { <-0.5, 1.0, 0> <0.0, 0.5, 0>, Cyl_Diam }
  45.     cylinder { < 0.0, 0.5, 0> <0.5, 1, 0>, Cyl_Diam }
  46.     cylinder { < 0.0, 0.5, 0> <0.0, 0, 0>, Cyl_Diam }
  47.     scale 0.5
  48. }
  49. #declare Z = union {
  50.     sphere { <-0.5, 1, 0>, Cyl_Diam }
  51.     sphere { < 0.5, 1, 0>, Cyl_Diam }
  52.     sphere { <-0.5, 0, 0>, Cyl_Diam }
  53.     sphere { < 0.5, 0, 0>, Cyl_Diam }
  54.     cylinder { <-0.5, 1.0, 0> <0.5, 1.0, 0>, Cyl_Diam }
  55.     cylinder { <-0.5, 0.0, 0> <0.5, 1, 0>, Cyl_Diam }
  56.     cylinder { <-0.5, 0.0, 0> <0.5, 0.0, 0>, Cyl_Diam }
  57.     scale 0.5
  58. }
  59.  
  60. #declare Dash = union {
  61.     sphere { <-0.2, 0.0, 0.0>, Cyl_Diam }
  62.     sphere { < 0.2, 0.0, 0.0>, Cyl_Diam  }
  63.     cylinder { <-0.2, 0.0, 0> <0.2, 0.0, 0>, Cyl_Diam  }
  64.     translate <-0.75, 0.5, 0>
  65.     scale 0.5
  66. }
  67. #declare Plus = union {
  68.     sphere { <-0.2, 0.0, 0.0>, Cyl_Diam }
  69.     sphere { < 0.2, 0.0, 0.0>, Cyl_Diam  }
  70.     cylinder { <-0.2, 0.0, 0> <0.2, 0.0, 0>, Cyl_Diam  }
  71.  
  72.     sphere { <0.0, 0.2, 0.0>, Cyl_Diam }
  73.     sphere { <0.0,-0.2, 0.0>, Cyl_Diam  }
  74.     cylinder { <0.0,-0.2, 0> <0.0, 0.2, 0>, Cyl_Diam  }
  75.  
  76.     translate <-0.75, 0.5, 0>
  77.     scale 0.5
  78.  
  79. }
  80. #declare PosX = union {
  81.     object { X }
  82.     object { Plus }
  83.     texture { T1 }
  84. }
  85. #declare PosY = union {
  86.     object { Y }
  87.     object { Plus }
  88.     texture { T1 }
  89. }
  90. #declare PosZ = union {
  91.     object { Z }
  92.     object { Plus }
  93.     texture { T1 }
  94. }
  95.  
  96. #declare Arrow_X = union { 
  97.     object { Cone_X  
  98.         translate x*0.5
  99.         scale <Cone_Len, Cone_Diam, Cone_Diam> 
  100.         translate  x*Cyl_Len 
  101.     }
  102.     cylinder { W_O , x*Cyl_Len, Cyl_Diam }
  103.     texture { T3 }
  104. }
  105. #declare Arrow_Y = union { 
  106.     object { Cone_Y  
  107.         translate y*0.5
  108.         scale <Cone_Diam, Cone_Len, Cone_Diam> 
  109.         translate y*Cyl_Len
  110.     }
  111.     cylinder { W_O , y*Cyl_Len, Cyl_Diam }
  112.     texture { T3 }
  113. }
  114. #declare Arrow_Z = union { 
  115.     object { Cone_Z  
  116.         translate z*0.5
  117.     scale <Cone_Diam, Cone_Diam, Cone_Len> 
  118.     translate z*Cyl_Len 
  119.     }
  120.     cylinder { W_O , z*Cyl_Len, Cyl_Diam }
  121.     texture { T3 }
  122. }
  123.  
  124. union {
  125.     object { PosX translate < 1.5,  0.2,  0.0> }
  126.     object { PosY translate < 0.0,  1.5,  -0.2> }
  127.     object { PosZ translate < 0.0,  0.2,  1.5> }
  128.     object { Arrow_X }
  129.     object { Arrow_Y }
  130.     object { Arrow_Z }
  131.     sphere { <0,0,0>, Cyl_Diam texture { T3 } }
  132. }
  133.