| 
  | 
Wasn't it Basiclife who wrote:
>Hi,
>
>I wonder if anyone can help me, I'm trying to create an isosurface which from
>above will be shaped as a T. My first idea was to do a rectangle and then cut
>off the bits I didn't want with a difference{} but this still calculates the
>whole isosurface which seems inefficient. My next plan was to have 2 isosurface
>with the same function to create the T shape. The problem is, I need the
>isosurface to reflect/refract and allow light to pass through it. My
>understanding is that instead of union{}ing the 2 isosurfaces, I simply needed
>to merge{} them - but unfortunately, thsi leaves strange artifacts visible
>(vertical black lines) I've tried overlapping the 2 isosurfaces in case it was
>due to a rounding error on the boundary to no effect. I've increased max_trace
>by an order of magnitude which hasn't helped either.
>
>Can someone please point me in the right direction?
One possible approach is to produce a single isosurface that has the
required shape
global_settings { max_trace_level 10 }
#declare Box = function { max((y*y-1),(x*x-1),(z*z-1)) }
isosurface {
  function {  min(
                Box(x,y*4-4,z*4),
                Box(x*4,y,z*4)
              )
           }
           max_gradient 45
           contained_by{sphere{0,2}}
           pigment {rgbt .9}
           interior {ior 1.3}
}
See: http://www.econym.demon.co.uk/isotut/combine.htm
-- 
Mike Williams
Gentleman of Leisure
 Post a reply to this message 
 | 
  |