POV-Ray : Newsgroups : povray.general : Suspected bug: difference of isosurfaces invisible Server Time
29 Jul 2024 22:32:39 EDT (-0400)
  Suspected bug: difference of isosurfaces invisible (Message 1 to 4 of 4)  
From: F  Hydrant
Subject: Suspected bug: difference of isosurfaces invisible
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

From: Thorsten Froehlich
Subject: Re: Suspected bug: difference of isosurfaces invisible
Date: 5 Mar 2010 04:54:07
Message: <4b90d4bf$1@news.povray.org>
On 05.03.10 06:55, F. Hydrant wrote:
> 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.

You need to use all_intersections if you want to use isosurfaces like this 
in CSG. This is explained in the document section about isosurfaces, see 
<http://www.povray.org/documentation/view/3.6.1/300/>.

	Thorsten, POV-Team


Post a reply to this message

From: F  Hydrant
Subject: Re: Suspected bug: difference of isosurfaces invisible
Date: 5 Mar 2010 07:00:01
Message: <web.4b90f14ddbece785bc32e3c0@news.povray.org>
Thanks!

Well, that's somewhat embarrassing.  I skimmed over that option because I'm
thinking in terms of objects rather than rays, and didn't see a problem with the
intersections of objects.


Post a reply to this message

From: ogawa
Subject: Re: Suspected bug: difference of isosurfaces invisible
Date: 7 Mar 2010 09:10:00
Message: <web.4b93b30fdbece78960a564c0@news.povray.org>
"F. Hydrant" <dpe### [at] scphyskyoto-uacjp> wrote:
> 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> }
>        }
> }

tanx...
its amazing information


Post a reply to this message

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