home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / povscn / math / torus.pov < prev    next >
Text File  |  1997-12-12  |  1KB  |  57 lines

  1. // Persistence Of Vision raytracer version 2.0 sample file.
  2.  
  3. // By Alexander Enzmann
  4. /* sample quartic scene file written by Alexander Enzmann */
  5.  
  6. #include "shapes.inc"
  7. #include "colors.inc"
  8. #include "textures.inc"
  9.  
  10. /* Torus having major radius sqrt(40), minor radius sqrt(12) */
  11. quartic {
  12.    < 1.0,  0.0,  0.0,   0.0,    2.0,  0.0,  0.0,  2.0,  0.0, -104.0,
  13.      0.0,  0.0,  0.0,   0.0,    0.0,  0.0,  0.0,  0.0,  0.0,    0.0,
  14.      1.0,  0.0,  0.0,   2.0,    0.0, 56.0,  0.0,  0.0,  0.0,    0.0,
  15.      1.0,  0.0, -104.0, 0.0,  784.0 >
  16.  
  17.    bounded_by { sphere { <0, 0, 0>, 10 } }
  18.  
  19.    texture {
  20.       pigment { Red }
  21.       finish {
  22.          phong 1.0
  23.          phong_size 10
  24.          ambient 0.2
  25.          diffuse 0.8
  26.       }
  27.    }
  28.    rotate -45*x
  29.    translate 20*z
  30. }
  31.  
  32. /* Put down checkered floor */
  33. plane {
  34.    y, -20.0
  35.    texture {
  36.       pigment {
  37.          checker colour NavyBlue colour MidnightBlue
  38.          scale 20.0
  39.       }
  40.       finish {
  41.          ambient 0.8
  42.          diffuse 0.2
  43.       }
  44.    }
  45. }
  46.  
  47. camera {
  48.    location  <0.0, 2.0, -10.0>
  49.    up        <0.0, 1.0,   0.0>
  50.    right     <4/3, 0.0,   0.0>
  51.    look_at   <0.0, 0.0,   0.0>
  52. }
  53.  
  54. light_source { <50, 100, 0> colour White }
  55.  
  56. light_source { <-200, 30, -300> colour White }
  57.