POV-Ray : Newsgroups : povray.newusers : Problem merging two isosurfaces : Problem merging two isosurfaces Server Time
28 Jul 2024 14:24:15 EDT (-0400)
  Problem merging two isosurfaces  
From: Mike
Date: 9 Oct 2008 14:05:00
Message: <web.48ee4781aaa214c0c9b9f9f00@news.povray.org>
I have been trying to create basically a cube in which the top and bottom face
is a 2D sine wave (egg crate pattern).  I have been able to do this using
isosurface, with some trouble however.  The way I found to do this was to make
one isosurface sine wave pattern contained by a box and then make another one
also contained by a box and flip it over.  My problem is that when I try to
merge the two objects I create, I have tried merge and union I always see a
middle boundary in between them.  The indicies of refraction are matched and I
am using fresnel reflection, so I do not see how or why I am seeing this.  If
anyone has any ideas on how to make this artifact go away that would be very
helpful.  I have posted the code I used to make the object below.

Thanks,
Mike

#declare MixedRegion =
material {
  texture {
     pigment {
        color rgbf<0.3, 0.5, .5,1>
      }

 finish {
        ambient 0.0
        diffuse 0.0
         reflection {
          0.0, 1.0
          fresnel on
        }
        conserve_energy
        specular 0.0
        roughness 0.0
 }
  }
  }


#declare botMixingHalf=
isosurface {
  function {
    ( y-5 + .1*sin(3*6.2832*x)*sin(3*6.2832*z))
  }
  max_gradient 4
  accuracy .0001
  contained_by { box { <-1.8999, 4.5, -1.8999>, <1.8999, 5.1, 1.8999> } }
material { MixedRegion }

     interior {
    ior 1.400
}
 photons{
             target
                refraction on
               reflection on
  }
 rotate 180*z
 translate 8*y
}


#declare topMixingHalf=
isosurface {
  function {
    ( y-4 - .1*sin(3*6.2832*x)*sin(3*6.2832*z))
  }
  max_gradient 4
  accuracy .0001
  contained_by { box { <-1.8999, 3.2, -1.8999>, <1.8999, 4.1, 1.8999> } }

material { MixedRegion }

     interior {
    ior 1.400
}
 photons{
                target
                refraction on
                reflection on
  }
}

#declare Mixingregion=
merge{object{topMixingHalf}
object{botMixingHalf}}

object{Mixingregion}


Post a reply to this message

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