POV-Ray : Newsgroups : povray.text.scene-files : testing, testing, CSG textures, testing... Server Time
1 Nov 2024 15:28:21 EDT (-0400)
  testing, testing, CSG textures, testing... (Message 1 to 2 of 2)  
From: Bob Hughes
Subject: testing, testing, CSG textures, testing...
Date: 19 Mar 2000 12:04:19
Message: <38d50893@news.povray.org>
// Persistence of Vision Ray Tracer Scene Description File
// File: keepingtexturesofCSGinslice.pov
// Vers: 3.1, MegaPov 0.4
// Desc: retaining textures of previous CSG while making a slice
// Date: 00.21
// Auth: Bob Hughes
// Mail: inv### [at] aolcom?Subject=Pov-Scene
// Note: this is only a test file and so might not be a working method

#version 3.1; // unofficial MegaPov 0.4;

#default {texture {pigment {rgb 1}}}

global_settings {
 max_trace_level 10
}

// white pointlight at camera position
#declare LCX = -10;
#declare LCY = 10;
#declare LCZ = -10;  // (-6.32 = 4x3 view at <0,0,0> if angle 36)

light_source { <LCX,LCY,LCZ> color rgb <1.5,1.5,1.5>
}

camera {
  location  <LCX,LCY,LCZ>
  angle 22.5  // angle 67 ~= direction 1
  look_at   <0, 0, 0>
}

/*
If the wrapping union (with sphere) of the CSG object
is removed the slice will seem to work right, otherwise not.
Though at this point I'm not sure any of it's correct.
*/

#declare UnionedSphere=no;

// The CSG Model

#declare CSG=  // this might be a complete model for example
#if (UnionedSphere=yes)
 union {  // problem with more complex(?) CSG
  sphere {0,1 pigment {rgbft<0,1,1,.133,.67>} scale <3,2,4>}
#end
   intersection {
    box {-1,1 pigment {rgb<1,1,0>} scale <1,1,1> rotate <30,45,60>}
    union {
      difference {
       sphere {<1,0,0>,1.5 pigment {rgb<1,0,0>}
       }
       sphere {<-1,0,0>,1.5 pigment {rgb<0,1,0>}
       }
      } // difference
     cone {-1.5*x,0,1.5*x,1 pigment {rgb<0,0,1>}}
    } // union
   }  // intersection
#if (UnionedSphere=yes)
 } // union
#end

// CSG  // actual model


// The CSG Slice

// intersecting doesn't work right
#declare SliceType=asc("D"); // [I]ntersection or [D]ifference
#declare SliceThickness=0.025;

#declare CSG_Cross_Section=
#switch (SliceType)
#case (73)
 intersection {
object {CSG scale <1,1,SliceThickness>
         translate (-1.5+(3*clock))*z // slice movement
         // inverse
        } // end of object
object {CSG
        } // end of object
 }  // closing of intersection
#break
#case (68)
 difference {
object {CSG
        } // end of object
object {CSG scale <1,1,SliceThickness>
         translate (-1.5+(3*clock))*z // slice movement
          inverse
        } // end of object
 }  // closing of difference
#break
#end

 CSG_Cross_Section  // final object seen

// End

// omniVerse http://users.aol.com/persistenceofv/all.htm


Post a reply to this message

From: Bob Hughes
Subject: Re: testing, testing, CSG textures, testing...
Date: 19 Mar 2000 12:19:33
Message: <38d50c25$1@news.povray.org>
I think I probably should have said in there someplace that you will need to run
this as animation not a still image.  Now it's said.

Bob


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.