home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / raytrace / rayce27 / csg7.r < prev    next >
Encoding:
Text File  |  1994-01-02  |  857 b   |  50 lines

  1. // torus testfile, CSG testfile
  2.  
  3. #include "surfs.inc"
  4.  
  5. camera { 
  6.   location <-1, 0, -4>
  7.   look_at <0, 0, 0>
  8.   fov 40
  9. }
  10.  
  11. options { 
  12.   tolerance 0.2        // needed for the cubic_cylinder
  13. }
  14.  
  15. object {
  16.   light_source { <-10, 10, -20> color red 1.0 blue 1.0 green 1.0 }
  17. }
  18.  
  19. #declare ShinyBlue  =  texture {
  20.   ambient color blue 0.2
  21.   diffuse color blue 0.7 red 0.2 green 0.2
  22.   specular color rgb <0.4, 0.4, 0.4>
  23.   roughness 0.1
  24. }
  25.  
  26. #declare algcsg1 = object {
  27.   intersection {
  28.     algebraic { $x^4+y^4+z^4 = 1 $ closed }
  29.     algebraic { $x^4+y^4+z^4 = 1 $ closed inverse scale <0.5> }
  30.     plane { <1, 0, 0>, 0 }
  31.   }
  32.   texture { ShinyBlue }
  33.   rotate <0, 45, 0>
  34. }
  35.  
  36.  
  37. // try rayce -d16 with this one.
  38. #declare algcsg2 = object {
  39.   intersection {
  40.    algebraic { Cubic_Cylinder inverse sturm } 
  41.    sphere { <0,0,0>, 1 } 
  42.   }
  43.   texture { ShinyBlue }
  44.   rotate <0, 20, 0>
  45. }
  46.  
  47.  
  48.  
  49.  
  50.