POV-Ray : Newsgroups : povray.general : Suspected bug: difference of isosurfaces invisible : Suspected bug: difference of isosurfaces invisible Server Time
30 Jul 2024 00:21:18 EDT (-0400)
  Suspected bug: difference of isosurfaces invisible  
From: F  Hydrant
Date: 5 Mar 2010 01:00:08
Message: <web.4b909cbe38c6c974fa8cd9d70@news.povray.org>
Subtracting two isosurfaces to create a shell, portions of the shell where the
inner (subtracted) surface should be visible are completely transparent.  Some
shadows are cast by the invisible shell.  Other shapes I've tried do not do
this.

I've tried this on Linux (Kubuntu 9.10 fully patched, POV-ray 3.6.1 as compiled
by Debian) and Windows Vista (32-bit fully patched, POV-ray 3.6.2 and
3.7.beta.35a) on a P4 dual core 3GHz, 3GB RAM computer, and on WinXP Home
(POV-ray 3.6.2 and 3.7.beta.35a, Core 2 Duo 2.33GHz, 1GB RAM, Japanese).

Sample code:


background { color <0,0.1,0.2> }

camera {
  orthographic
  location <2, 6, -20>
  right <8, 0, 0>
  up <0, 6, 0>
  look_at <0, 0, 0>
}

light_source { <50, 50, -20> colour <1,1,1> }
light_source { <-20, -5, -10> colour <1,1,1> }
light_source { <-2, 5, -10> colour <1,1,1> }

difference{
isosurface{
    function{ pow(x,2) + pow(y,2) + pow(z,2) - pow(2.5,2) }
    contained_by { sphere { <0,0,0>, 2.51 } }
    max_gradient 5.1
    pigment{color <1,1,0>}
           }
isosurface{
    function{ pow(x,2) + pow(y,2) + pow(z,2) - pow(2.4,2) }
    contained_by { sphere { <0,0,0>, 2.51 } }
    max_gradient 5.1
    pigment{color <1,1,0>}
           }
  box { <0, -5, 0>, <5, 5, -5>
    rotate <0, 45, 0>
    pigment{ color <1,1,0> }
       }
}

// I found the following helpful in demonstrating the issue

difference{
 torus{ 1, 0.2
      pigment{ color <1,0,0> }
      translate <0,-2.35,0>
       }
  box { <0, -5, 0>, <5, 5, -5>
    rotate <0, 45, 0>
    pigment{ color <1,0,0> }
       }
}


Post a reply to this message

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