POV-Ray : Newsgroups : povray.general : CSG difference of isosurfaces : CSG difference of isosurfaces Server Time
26 Apr 2024 03:46:58 EDT (-0400)
  CSG difference of isosurfaces  
From: John Greenwood
Date: 12 Nov 2016 06:00:00
Message: <web.5826f40654645fe0a7cafab50@news.povray.org>
In my development of rounded objects I want to define two versions of a complex
curvy shape, one bigger than the other, and take the smaller one away from the
larger to leave a shell with (almost) uniform thickness.

I have tried to do this with CSG difference, but it appears that the smaller
isosurface is transparent to rays meeting the inside surface. How can this
surface be made visable? I think this could be a useful extension of this
technique.

Here is a simple demo of the effect:

#version 3.7 ;
  global_settings {assumed_gamma 1.0 }

    camera {location <-30,20,-40> angle 7 look_at <0,0,0> }
    light_source {<-5,20,-20> colour rgb<1,1,1>}
   background { color rgb<0.2, 0.4, 0.8>  }

#difference {

  isosurface {
     function  {

         pow(x,2)+pow(y,2)+pow(z,2)-pow(1.1,2)

            }
     threshold 1
      max_gradient 60
     contained_by { box {<-3.2,-3.2, -3.2>, <3.2,3.2,3.2>} }
  texture {pigment {color rgb < 1, 0.9, 0.65>}}

               }


  isosurface {
     function  {

         pow(x,2)+pow(y,2)+pow(z,2)-pow(.9,2)

            }
     threshold 1
      max_gradient 60
     contained_by { box {<-3.2,-3.2, -3.2>, <3.2,3.2,3.2>} }
  texture {pigment {color rgb < 1, 0.9, 0.65>}}

               }

  box {<-5,0,0>,<5,5,-5>}
          }


Post a reply to this message

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