Guest User

Untitled

a guest
Mar 20th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.72 KB | None | 0 0
  1. #version 3.7;
  2. global_settings {
  3. assumed_gamma 1
  4. ambient_light srgb <1,1,1>
  5. }
  6. #declare Grey50 = srgbft <0.0,0.0,0.0,0,0>;
  7. background { color Grey50 }
  8.  
  9. #declare White = srgbft <1,1,1,0,0>;
  10. #declare Light00 = light_source {
  11. <50,150,-250>, White
  12. }
  13. #declare Green = srgbft <0,1,0,0,0>;
  14. #declare CylSide0 = cylinder {
  15. <-10,0,-10>, <10,0,10>, 1.01
  16. pigment { color Green }
  17. translate <0,10,0>
  18. }
  19. #declare CylSide1 = cylinder {
  20. <-10,-10,0>, <10,10,0>, 1.01
  21. pigment { color Green }
  22. translate <0,0,10>
  23. }
  24. #declare CylSide2 = cylinder {
  25. <10,0,-10>, <-10,0,10>, 1.01
  26. pigment { color Green }
  27. translate <0,-10,0>
  28. }
  29. #declare CylSide3 = cylinder {
  30. <10,-10,0>, <-10,10,0>, 1.01
  31. pigment { color Green }
  32. translate <0,0,-10>
  33. }
  34. #declare Red = srgbft <1,0,0,0,0>;
  35. #declare CylCrn0 = cylinder {
  36. <-10,0,0>, <10,0,0>, 1.01
  37. pigment { color Red }
  38. translate <0,10,10>
  39. }
  40. #declare CylCrn1 = cylinder {
  41. <-10,0,0>, <10,0,0>, 1.01
  42. pigment { color Red }
  43. translate <0,-10,10>
  44. }
  45. #declare CylCrn2 = cylinder {
  46. <-10,0,0>, <10,0,0>, 1.01
  47. pigment { color Red }
  48. translate <0,-10,-10>
  49. }
  50. #declare CylCrn3 = cylinder {
  51. <-10,0,0>, <10,0,0>, 1.01
  52. pigment { color Red }
  53. translate <0,10,-10>
  54. }
  55. #declare Union00 = union {
  56. object { CylCrn0 }
  57. object { CylCrn1 }
  58. object { CylCrn2 }
  59. object { CylCrn3 }
  60. object { CylSide0 }
  61. object { CylSide1 }
  62. object { CylSide2 }
  63. object { CylSide3 }
  64. }
  65. #declare TextXp = text {
  66. internal 1 "X+"
  67. 0.5, 0.0
  68. translate <-0.5,-0.5,-0.25>
  69. rotate y*90
  70. translate <1,0,0>
  71. }
  72. #declare TextXn = text {
  73. internal 1 "X-"
  74. 0.5, 0.0
  75. translate <-0.5,-0.5,-0.25>
  76. rotate y*90
  77. translate <-1,0,0>
  78. }
  79. #declare TextYp = text {
  80. internal 1 "Y+"
  81. 0.5, 0.0
  82. translate <-0.5,-0.5,-0.25>
  83. rotate x*-90
  84. translate <0,1,0>
  85. }
  86. #declare TextYn = text {
  87. internal 1 "Y-"
  88. 0.5, 0.0
  89. translate <-0.5,-0.5,-0.25>
  90. rotate x*-90
  91. translate <0,-1,0>
  92. }
  93. #declare TextZp = text {
  94. internal 1 "Z+"
  95. 0.5, 0.0
  96. translate <-0.5,-0.5,-0.25>
  97. translate <0,0,1>
  98. }
  99. #declare TextZn = text {
  100. internal 1 "Z-"
  101. 0.5, 0.0
  102. translate <-0.5,-0.5,-0.25>
  103. translate <0,0,-1>
  104. }
  105. #declare Orange = srgbft <1,0.5,0,0,0>;
  106. #declare Union01 = union {
  107. object { TextXp }
  108. object { TextXn }
  109. object { TextYp }
  110. object { TextYn }
  111. object { TextZp }
  112. object { TextZn }
  113. pigment { color rgb<1,0,0> }
  114. }
  115. #declare Sphere0 = sphere { <3,5,3>, 0.5 }
  116. #declare Sphere1 = sphere { <-3,5,3>, 0.5 }
  117. #declare Sphere2 = sphere { <3,-5,3>, 0.5 }
  118. #declare Sphere3 = sphere { <-3,-5,3>, 0.5 }
  119. #declare Sphere4 = sphere { <3,5,-3>, 0.5 }
  120. #declare Sphere5 = sphere { <-3,5,-3>, 0.5 }
  121. #declare Sphere6 = sphere { <3,-5,-3>, 0.5 }
  122. #declare Sphere7 = sphere { <-3,-5,-3>, 0.5 }
  123. #declare Magenta = srgbft <1,0,1,0,0>;
  124. #declare Union02 = union {
  125. object { Sphere0 }
  126. object { Sphere1 }
  127. object { Sphere2 }
  128. object { Sphere3 }
  129. object { Sphere4 }
  130. object { Sphere5 }
  131. object { Sphere6 }
  132. object { Sphere7 }
  133. pigment { color rgb<0,0,1> }
  134. }
  135.  
  136. object { Union00 }
  137. object { Union01 }
  138. object { Union02 }
  139.  
  140. #declare coordBox = 7;
  141. box
  142. {
  143. -coordBox,
  144. coordBox
  145.  
  146. pigment
  147. {
  148. checker pigment{
  149. rgb<0.5,0.5,0.5>
  150. filter 0
  151. },
  152. pigment{
  153. rgb<0.3,0.3,0.3>
  154. filter 0
  155. }
  156. translate<0,0,0.5>
  157. }
  158. hollow
  159. }
  160.  
  161.  
  162. light_source { <0,coordBox-0.1,0>, rgb<1,1,1>*2 }
  163.  
  164.  
  165.  
  166. sphere { <0,0,0.6> 0.03 pigment { rgb<1,1,0> } }
  167. sphere { <-0.6,0,0> 0.03 pigment { rgb<1,1,0> } }
  168. sphere { <0.6,0,0> 0.03 pigment { rgb<1,1,0> } }
  169. sphere { <0,0,-0.6> 0.03 pigment { rgb<1,1,0> } }
  170.  
  171.  
  172. #declare odsIPD = 0.065;
  173.  
  174. #declare odsLocationX = 0;
  175. #declare odsLocationY = 0;
  176. #declare odsLocationZ = 0;
  177. camera {
  178. user_defined
  179. location {
  180. function { odsLocationX + cos(((x+0.5)) * 2 * pi - pi)*odsIPD/2*select(-y,-1,+1) }
  181. function { odsLocationY }
  182. function { odsLocationZ + sin(((x+0.5)) * 2 * pi - pi)*odsIPD/2*select(-y,-1,+1) }
  183. }
  184. direction {
  185. function { sin(((x+0.5)) * 2 * pi - pi) * cos(pi / 2 -select(y, 1-2*(y+0.5), 1-2*y) * pi) }
  186. function { sin(pi / 2 - select(y, 1-2*(y+0.5), 1-2*y) * pi) }
  187. function { -cos(((x+0.5)) * 2 * pi - pi) * cos(pi / 2 -select(y, 1-2*(y+0.5), 1-2*y) * pi) * -1}
  188. }
  189. }
Add Comment
Please, Sign In to add comment