Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    CSG - Constructive Solid Geometry -
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial
- Download-Page

  - CSG Constructive
            Solid
            Geometry
    - union + merge
    - difference
    - intersection
       + invers
   > clipped_by
    - coincident surfaces
    - textures in CSG
                                           
Boolean Algebra with Solids - part V

About "clipped_by{...}"



clipped_by{...}


A sectional cut with "clipped_by{...}":
  The effect is similar to "intersection" and "difference" . With two or more shapes it results in a shape which has an area that consists of the area that is common to all these shapes, the area where the objects are overlapping - but the shape of this new object is opened at the cutting surfaces.

Sample:
sphere {<0,0,0>,0.5
        texture{ pigment{ color rgb<1,0,0.2>}
                 finish { phong 1 }}
        clipped_by{ sphere{<0,0,0>,0.5 translate<0.5,0,-0> inverse}} 
        rotate <0,25,0>
        translate <-0.25,0,0>} 
  The shape in the "clipped_by{...}" statement has no texture. The remaining part of the first object is just the skin of this object. The texture statement describes the skin of an object (if "interior" is not defined) and this you will see from inside.
  If the "clipped" object consists by a "union" of other objects - like in the following sample - then all these objects which intersect with the clipped_by shape will be cut open by it.
Sample:
union{
  sphere {<0,0,0>,0.5
          texture{ pigment{ color rgb<1,0,0.2>}
                   finish { phong 1 }}}
  sphere {<0,0,0>,0.4
          texture{ pigment{ color rgb<1,0.4,0.2>}
                   finish { phong 1 }}}
  sphere {<0,0,0>,0.3
          texture{ pigment{ color rgb<1,0.5,0.1>}
                   finish { phong 1 }}}
  sphere {<0,0,0>,0.2
          texture{ pigment{ color rgb<1,0.7,0.1>}
                   finish { phong 1 }}}
  clipped_by{sphere {<0,0,0>,0.5 translate<0.5,0,-0> inverse}}
  rotate <15,55,0> translate <-0.25,0,0>} 


This make it possibel to create the thin petals of a flower or a sectional view which shows the inside of a building or a machine!


CSG | union + merge | difference | intersection + inverse | clipped_by | coincident surfaces | textures
top

© Friedrich A. Lohmüller, 2012
www.f-lohmueller.de