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 II

About "union" and "merge"



union{...} or merge{...}

Both commands were used to combine two ore more objects to a new object. The objects may be objects without any physical connections!
These commands are usefull to give different objects the same texture or to transforme them together (by scale, rotate, translate or matrix) with only one command.
e.g.: This makes it easy to create a pawn figure by different primitiv solids and then texture it with a continuous wood texture.
Transparent objects and "union":
The command "merge{...}" lets disappear the internal surfaces of the connected objects - this is only of special interest if objects are transparent and have to look like made in one casting. In other cases - using opaque textures - it is not necessary to use "merge" because "union" has the same effect (most times faster!).

Sample:
union{
  sphere{<0,1,0>,0.35}
  cone{<0,0,0>,0.45,<0,1.2,0>,0}
  texture{T_Glass3} interior{I_Glass}
  translate <-0.5, 0, 0>
     }
merge{ 
  sphere{<0,1,0>,0.35}
  cone{<0,0,0>,0.45,<0,1.2,0>,0}
  texture{T_Glass3} interior{I_Glass}
  translate < 0.5, 0, 0>
     }
A glass texture with union{...} and with merge{...}

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

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