POV-Ray : Newsgroups : povray.newusers : Merge vs. Union : Re: Merge vs. Union Server Time
5 Sep 2024 20:19:34 EDT (-0400)
  Re: Merge vs. Union  
From: Ken
Date: 18 Sep 1999 01:16:11
Message: <37E31FAD.AB86518A@pacbell.net>
Ian Burgmyer wrote:

> In other words, just use a group in Moray ;)

sigh ! A modeller user.
 
> >   A merge operation on the otherhand is a true CSG operation and has
> > specific uses. The main feature of a merge operation is that it will
> > remove the interior surfaces of over lapping objects. This is useful
> > it you don't want a "cell" effect when over lapping several objects
> > since the merge operation removes all internal faces. You will in most
> > cases use this operation only when using clear objects but the are some
> > special cases where you can use it with solid colored objects as well.
> > I would have to dig deep to give you an example of the last but would
> > gladly do so if you are interested.
> 
> Yeah, I'm interested!  I'd like to see how the merge operation ticks.
> 
> Don't go through too much trouble, though :)
> 
> Thanks!
> -Ian

Found it. This example is excellent for this thread because it uses both
a union to group together cones with and then uses the merge function in
a non typical usage that clears the inside surfaces. I will leave it as
an experiment to the user to find out why it works. Test in 1 week...

// Super neat geometric shape using the merge function
#declare SnowTex = 
  texture {
   pigment { rgb 1 }
     finish {
               crand      0.1
               ambient    0.6
               diffuse    0.2
               specular   1
               roughness  0.001
               brilliance 2
               reflection 0.02
     }
  }

#declare MB = 
 union {
        cone { <0,0,0>,1.3,< 0, 1, 0>,-0.25 open}
        cone { <0,0,0>,1.3,< 0,-1, 0>,-0.25 open}
        cone { <0,0,0>,1.3,< 1, 0, 0>,-0.25 open}
        cone { <0,0,0>,1.3,<-1, 0, 0>,-0.25 open}
        cone { <0,0,0>,1.3,< 0, 0, 1>,-0.25 open}
        cone { <0,0,0>,1.3,< 0, 0,-1>,-0.25 open}
 }

#declare Fk = 
 merge {
        sphere { <0,0,0>,1.1   }
        object { MB rotate  0*y}
        object { MB rotate 45*z}
        object { MB rotate 45*y}
        object { MB rotate 45*x}
 }

 object { Fk
  texture { SnowTex }
  scale 2
 }

camera { location<0,0,-9> look_at 0}

light_source { < 100,225,-200> rgb 1}

Enjoy,

-- 
Ken Tyler

See my 1000+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

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