home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / scripts / pov / spikey.pov < prev    next >
Encoding:
Text File  |  1994-04-21  |  6.1 KB  |  275 lines

  1.       /*
  2.  
  3.          Spikey Ball Object For PovRay Version 2.1
  4.  
  5.          Crafted By Editor and POVRAY (Cheers team, great software.)
  6.  
  7.          A sphere with a cone at every 45 degree point (28 Cones)
  8.          
  9.          Every surface has a Chrome texture, with three lights White & Gold
  10.          above & Red below. 
  11.  
  12.          My first Raytrace (just got the software) - Hope you like it, if
  13.          anybody knows a neater way of achieveing the Cone rotations please
  14.          let me know!. It took a while working out the angles.
  15.  
  16.          This could be useful for placeing the rotations of the object in an
  17.          include file so as to be able rotate any passed object... (Maybe...)
  18.          
  19.          POVRAY Options I used were :- RUNPOV D640 SPIKEY +A -D -X
  20.          Creation time around 12 minutes on a 486 DX 66.
  21.  
  22.          For a spikey space mine animation with the spikes appearing from
  23.          within the sphere use the +K input switch to POVRAY's clock variable
  24.          with setting of 2.0 - 4.85 incremented by .15 (for twenty frames),
  25.          which modifies the cone length [C_Leng]. (switch the commented out
  26.          #declare statements for the clock setting).
  27.  
  28.          Then join the .TGA files with a TGA to FLI program (use which res.
  29.          suits your kit & flick player). 
  30.  
  31.          I included a 320x240x256c GIF of the image only 9,477 bytes to give
  32.          an idea of the what the image looks like before rendering.
  33.  
  34.       */
  35.  
  36.       #include "colors.inc"    // The include files contain
  37.       #include "shapes.inc"    // pre-defined scene elements
  38.       #include "textures.inc"
  39.  
  40.       #declare C_Base = .5    // Cone base radius
  41.       #declare C_Adj  = (clock - 2) * 5
  42.  
  43. //    #declare C_Leng = clock    // Cone length
  44.       #declare C_Leng = 5    // Cone length
  45.  
  46.       camera {
  47.         location  < 2.12 , 2.12 ,-11>
  48.     //rotate < C_Adj,C_Adj, 0>
  49.     direction < 0, 0, 1>
  50.         look_at   < 0, 0, 0>
  51.       }
  52.  
  53.       light_source {
  54.         <2, 4, -3> color White
  55.       }
  56.  
  57.       light_source {
  58.         <-2, 4, -3> color Gold
  59.       }
  60.  
  61.       light_source {
  62.         < 0,-8, 0> color Red
  63.       }
  64.  
  65.       sphere {
  66.         <0, 0, 0>, 2
  67.         texture {
  68.           Chrome_Texture
  69.         }
  70.       }
  71.  
  72.       cone {
  73.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  74.         texture {
  75.           Chrome_Texture
  76.         }
  77.       }
  78.  
  79.       cone {
  80.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  81.         rotate <0, 0,45>
  82.         texture {
  83.           Chrome_Texture
  84.         }
  85.       }
  86.  
  87.       cone {
  88.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  89.         rotate <0, 0,90>
  90.         texture {
  91.           Chrome_Texture
  92.         }
  93.       }
  94.  
  95.       cone {
  96.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  97.         rotate <0, 0,135>
  98.         texture {
  99.           Chrome_Texture
  100.         }
  101.       }
  102.  
  103.       cone {
  104.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  105.         rotate <0, 0,180>
  106.         texture {
  107.           Chrome_Texture
  108.         }
  109.       }
  110.  
  111.       cone {
  112.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  113.         rotate <0, 0,225>
  114.         texture {
  115.           Chrome_Texture
  116.         }
  117.       }
  118.  
  119.       cone {
  120.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  121.         rotate <0, 0,270>
  122.         texture {
  123.           Chrome_Texture
  124.         }
  125.       }
  126.  
  127.       cone {
  128.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  129.         rotate <0, 0,315>
  130.         texture {
  131.           Chrome_Texture
  132.         }
  133.       }
  134.  
  135.       cone {
  136.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  137.         rotate <45,0, 0>
  138.         texture {
  139.           Chrome_Texture
  140.         }
  141.       }
  142.  
  143.       cone {
  144.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  145.         rotate <90,0, 0>
  146.         texture {
  147.           Chrome_Texture
  148.         }
  149.       }
  150.  
  151.       cone {
  152.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  153.         rotate <135,0, 0>
  154.         texture {
  155.           Chrome_Texture
  156.         }
  157.       }
  158.  
  159.       cone {
  160.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  161.         rotate <225,0,0>
  162.         texture {
  163.           Chrome_Texture
  164.         }
  165.       }
  166.  
  167.       cone {
  168.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  169.         rotate <270,0,0>
  170.         texture {
  171.           Chrome_Texture
  172.         }
  173.       }
  174.  
  175.       cone {
  176.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  177.         rotate <315,0, 0>
  178.         texture {
  179.           Chrome_Texture
  180.         }
  181.       }
  182.  
  183.       cone {
  184.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  185.         rotate <0, 45, 0>
  186.         texture {
  187.           Chrome_Texture
  188.         }
  189.       }
  190.  
  191.       cone {
  192.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  193.         rotate <0,135, 0>
  194.         texture {
  195.           Chrome_Texture
  196.         }
  197.       }
  198.  
  199.       cone {
  200.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  201.         rotate <0,225, 0>
  202.         texture {
  203.           Chrome_Texture
  204.         }
  205.       }
  206.  
  207.       cone {
  208.         <0, 0, 0>, C_Base < C_Leng, 0, 0>, 0
  209.         rotate <0,315, 0>
  210.         texture {
  211.           Chrome_Texture
  212.         }
  213.       }
  214.  
  215.       cone {
  216.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  217.         rotate <-45, 45, 0>
  218.         texture {
  219.           Chrome_Texture
  220.         }
  221.       }
  222.       cone {
  223.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  224.         rotate <-45,-45, 0>
  225.         texture {
  226.           Chrome_Texture
  227.         }
  228.       }
  229.       cone {
  230.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  231.         rotate <-135, 45, 0>
  232.         texture {
  233.           Chrome_Texture
  234.         }
  235.       }
  236.       cone {
  237.         <0, 0, 0>, C_Base < 0, C_Leng, 0>, 0
  238.         rotate <-135,-45, 0>
  239.         texture {
  240.           Chrome_Texture
  241.         }
  242.       }
  243.       cone {
  244.         <0, 0, 0>, C_Base < 0, -C_Leng, 0>, 0
  245.         rotate <-45, 45, 0>
  246.         texture {
  247.           Chrome_Texture
  248.         }
  249.       }
  250.       cone {
  251.         <0, 0, 0>, C_Base < 0, -C_Leng, 0>, 0
  252.         rotate <-45,-45, 0>
  253.         texture {
  254.           Chrome_Texture
  255.         }
  256.       }
  257.       cone {
  258.         <0, 0, 0>, C_Base < 0, -C_Leng, 0>, 0
  259.         rotate <-135, 45, 0>
  260.         texture {
  261.           Chrome_Texture
  262.         }
  263.       }
  264.       cone {
  265.         <0, 0, 0>, C_Base < 0, -C_Leng, 0>, 0
  266.         rotate <-135,-45, 0>
  267.         texture {
  268.           Chrome_Texture
  269.         }
  270.       }
  271.  
  272.       // End of Spikey.pov
  273.  
  274.  
  275.