home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / p / ply15dat.zip / SPIRAL.PI < prev    next >
Text File  |  1992-11-07  |  4KB  |  95 lines

  1. // File demonstrating height field function
  2. // Polyray input file: Alexander Enzmann
  3.  
  4. // Set up the camera
  5. viewpoint {
  6.    from <0, 20, -20>
  7.    at <0, 0, 0>
  8.    up <0,1,0>
  9.    angle 45
  10.    resolution 512, 512
  11.    }
  12.  
  13. // Get various surface finishes
  14. include "spcolor.inc"
  15.  
  16. // Set up background color & lights
  17. background midnightblue
  18. light <10,50,-20>
  19.  
  20. define VeryDarkWood1 <0.30 , 0.15 , 0.09>
  21. define DarkWood1 < 0.60 , 0.30 , 0.18>
  22.  
  23. define Wooden
  24. texture {
  25.    noise surface {
  26.       color white
  27.       position_fn 3
  28.       lookup_fn 2
  29.       octaves 1
  30.       turbulence 5
  31.       ambient 0.2
  32.       diffuse 0.8
  33.       specular 0.25
  34.       microfacet Reitz 10
  35.       color_map(
  36.          [0,   0.1, DarkWood1,   DarkWood1]
  37.          [0.1, 0.9, DarkWood1, VeryDarkWood1]
  38.          [0.9, 1, VeryDarkWood1,  VeryDarkWood1])
  39.       }
  40.    scale <0.5, 0.5, 0.5>
  41.    translate <0.3, 0.7, 0>
  42.    rotate <90, 0, 0>
  43.    }
  44.  
  45. object {
  46.    height_field "spirhf.tga"
  47.    translate <-0.5, 0, -0.5>
  48.    Wooden
  49.    scale <24, 0.2, 24>
  50.    }
  51.  
  52. // Define the distances and angles of the balls
  53. define t0   0 define t1 200 define t2 -30 define t3 -80 define t4  130
  54. define t5  50 define t6  90 define t7  70 define t8 170 define t9 -120 
  55. define r0  1.5 define r1  4.7 define r2  6.3 define r3  4.4 define r4  9.5
  56. define r5  8   define r6  3.4 define r7  5.5 define r8  7.2 define r9  9.2
  57.  
  58. // Define the positions of the balls
  59. define loc0 <r0*cos(radians(t0)), 0.5, r0*sin(radians(t0))>
  60. define loc1 <r1*cos(radians(t1)), 0.5, r1*sin(radians(t1))>
  61. define loc2 <r2*cos(radians(t2)), 0.5, r2*sin(radians(t2))>
  62. define loc3 <r3*cos(radians(t3)), 0.5, r3*sin(radians(t3))>
  63. define loc4 <r4*cos(radians(t4)), 0.5, r4*sin(radians(t4))>
  64. define loc5 <r5*cos(radians(t5)), 0.5, r5*sin(radians(t5))>
  65. define loc6 <r6*cos(radians(t6)), 0.5, r6*sin(radians(t6))>
  66. define loc7 <r7*cos(radians(t7)), 0.5, r7*sin(radians(t7))>
  67. define loc8 <r8*cos(radians(t8)), 0.5, r8*sin(radians(t8))>
  68. define loc9 <r9*cos(radians(t9)), 0.5, r9*sin(radians(t9))>
  69.  
  70. define t10  95 define t11  120 define t12 -15 define t13 -35 define t14  65
  71. define t15 -25 define t16  -90 define t17 145 define t18 150 define t19 -160 
  72. define r10  7.2 define r11  0.9 define r12  6.2 define r13  4.2 define r14  3.5
  73. define r15  8.5 define r16  6.3 define r17  5   define r18  9.3 define r19  7
  74. define loc10 <r10*cos(radians(t10)), 0.5, r10*sin(radians(t10))>
  75. define loc11 <r11*cos(radians(t11)), 0.5, r11*sin(radians(t11))>
  76. define loc12 <r12*cos(radians(t12)), 0.5, r12*sin(radians(t12))>
  77. define loc13 <r13*cos(radians(t13)), 0.5, r13*sin(radians(t13))>
  78. define loc14 <r14*cos(radians(t14)), 0.5, r14*sin(radians(t14))>
  79. define loc15 <r15*cos(radians(t15)), 0.5, r15*sin(radians(t15))>
  80. define loc16 <r16*cos(radians(t16)), 0.5, r16*sin(radians(t16))>
  81. define loc17 <r17*cos(radians(t17)), 0.5, r17*sin(radians(t17))>
  82. define loc18 <r18*cos(radians(t18)), 0.5, r18*sin(radians(t18))>
  83. define loc19 <r19*cos(radians(t19)), 0.5, r19*sin(radians(t19))>
  84.  
  85. object{sphere loc0,0.5 shiny_red     } object{sphere loc1,0.5 shiny_blue   }
  86. object{sphere loc2,0.5 shiny_green   } object{sphere loc3,0.5 shiny_coral  }
  87. object{sphere loc4,0.5 shiny_cyan    } object{sphere loc5,0.5 shiny_yellow }
  88. object{sphere loc6,0.5 shiny_magenta } object{sphere loc7,0.5 shiny_orange }
  89. object{sphere loc8,0.5 shiny_gold    } object{sphere loc9,0.5 shiny_salmon }
  90. object{sphere loc10,0.5 shiny_red    } object{sphere loc11,0.5 shiny_blue  }
  91. object{sphere loc12,0.5 shiny_green  } object{sphere loc13,0.5 shiny_coral }
  92. object{sphere loc14,0.5 shiny_cyan   } object{sphere loc15,0.5 shiny_yellow}
  93. object{sphere loc16,0.5 shiny_magenta} object{sphere loc17,0.5 shiny_orange}
  94. object{sphere loc18,0.5 shiny_gold   } object{sphere loc19,0.5 shiny_salmon}
  95.