home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / pov3demo / objects / trimesh1.pov < prev    next >
Text File  |  1997-12-12  |  2KB  |  58 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // File by Dieter Bayer
  3. // This scene shows the texturing feature of triangle meshes.
  4.  
  5.  
  6. #version 3.0
  7. global_settings { assumed_gamma 2.2 }
  8.  
  9. camera {
  10.   location <20, 20, -50>
  11.   right 4/3*x
  12.   up y
  13.   look_at <0, 5, 0>
  14. }
  15.  
  16. light_source { <50, 50, -50> color rgb<1, 1, 1> }
  17.  
  18. #declare Red = texture {
  19.   pigment { color rgb<0.8, 0.2, 0.2> }
  20.   finish { ambient 0.2 diffuse 0.5 }
  21. }
  22.  
  23. #declare Green = texture {
  24.   pigment { color rgb<0.2, 0.8, 0.2> }
  25.   finish { ambient 0.2 diffuse 0.5 }
  26. }
  27.  
  28. #declare Blue = texture {
  29.   pigment { color rgb<0.2, 0.2, 0.8> }
  30.   finish { ambient 0.2 diffuse 0.5 }
  31. }
  32.  
  33. mesh {
  34.   /* top side */
  35.   triangle { <-10, 10, -10>, <10, 10, -10>, <10, 10, 10> texture { Red } }
  36.   triangle { <-10, 10, -10>, <-10, 10, 10>, <10, 10, 10> texture { Red } }
  37.   /* bottom side */
  38.   triangle { <-10, -10, -10>, <10, -10, -10>, <10, -10, 10> }
  39.   triangle { <-10, -10, -10>, <-10, -10, 10>, <10, -10, 10> }
  40.   /* left side */
  41.   triangle { <-10, -10, -10>, <-10, -10, 10>, <-10, 10, 10> }
  42.   triangle { <-10, -10, -10>, <-10, 10, -10>, <-10, 10, 10> }
  43.   /* right side */
  44.   triangle { <10, -10, -10>, <10, -10, 10>, <10, 10, 10> texture { Green } }
  45.   triangle { <10, -10, -10>, <10, 10, -10>, <10, 10, 10> texture { Green } }
  46.   /* front side */
  47.   triangle { <-10, -10, -10>, <10, -10, -10>, <-10, 10, -10> texture { Blue } }
  48.   triangle { <-10, 10, -10>, <10, 10, -10>, <10, -10, -10> texture { Blue } }
  49.   /* back side */
  50.   triangle { <-10, -10, 10>, <10, -10, 10>, <-10, 10, 10> }
  51.   triangle { <-10, 10, 10>, <10, 10, 10>, <10, -10, 10> }
  52.   texture {
  53.     pigment { color rgb<0.9, 0.9, 0.9> }
  54.     finish { ambient 0.2 diffuse 0.7 }
  55.   }
  56. }
  57.  
  58.