POV-Ray : Newsgroups : povray.general : Help with isosurface intersection needed : Help with isosurface intersection needed Server Time
8 Aug 2024 20:20:07 EDT (-0400)
  Help with isosurface intersection needed  
From: BigCeef
Date: 9 Oct 2000 09:22:43
Message: <39e1c6a3@news.povray.org>
Hi all,

This is the first time I've used the isosurface function, and things aren't
behaving as I thought they would.

Using the code below, if I simply render the isosurface, I get a sphere with
the pattern all the way through, which is what I want.

However, when I use the isosurface within a CSG intersection, all (or most)
of the insides disappear, and the effect is similar to simply using a
color_map with filter...which is NOT what I want.

Am I doing something wrong, or is it impossible to achieve the effect I'm
after? I wa under the impression that isosurfaces could be used without
problems in CSG's.

Thanks,

Andy Cocker

-\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--\|/--
\|/--\|/--\|/--\|/--\|/--\|/--\|/-

#declare tex1=
texture {
pigment { crackle color_map {[0 rgb 1][0.25 rgb <1,.6,.47>][0.5 rgb
<.2,.7,.9>][0.75 rgb <1,.916,.6>][1 rgb <.2,.7,.9>]}}
finish {  ambient 0 }
scale 0.5
}

#declare rad=0.4;
#declare X=
merge {
cylinder { <-2,0,0>,<2,0,0>,rad}
cylinder { <0,-2,0>,<0,2,0>,rad}
sphere {<-2,0,0>,rad}
sphere {<2,0,0>,rad}
sphere {<0,2,0>,rad}
sphere {<0,-2,0>,rad}
sphere {<-2-rad*.5,0,0>,rad/2}
sphere {<2+rad*.5,0,0>,rad/2}
sphere {<0,2+rad*.5,0>,rad/2}
sphere {<0,-2-rad*.5,0>,rad/2}
sphere {<0,0,0>,rad*1.5}
}

#declare Func =
function {
    pigment {crackle turbulence 0 color_map {[0 rgb 1][0.25 rgb 0][0.5 rgb
1][0.75 rgb 0][1 rgb 1]}}
}

#declare Main=yes;

#if (Main)
intersection {
isosurface {
    function {Func(x, y, z)}
    threshold 0.5
    contained_by {
         sphere {<0,0,0>,4 }//box {<-4,-4,-4>, < 4, 4, 4>}
    }
    texture {tex1}
    scale 0.5

}
object {X texture {tex1}hollow}
rotate z*45}
#end


Post a reply to this message

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