POV-Ray : Newsgroups : povray.general : Inner face of isosurface seems not to exist : Re: Inner face of isosurface seems not to exist Server Time
29 Jul 2024 08:15:13 EDT (-0400)
  Re: Inner face of isosurface seems not to exist  
From: waggy
Date: 11 Jun 2012 09:20:00
Message: <web.4fd5efbe339330479726a3c10@news.povray.org>
"Sereib" wrote:
> which generally works. The yellow outer face as well as the blue cross section
> are visible and indicate that, in principle, the function gives a spherical
> shell. However, the inner face of the shell is invisible - even more than
> invisible, the background of the scene is visible in this direction through the
> shell. Adding "interior_texture" does not help, the rays just find no object if
> they hit the inner face. Increasing accuracy and gradient does also not fix the
> problem.
>
It looks like it's possible to work around this odd problem using a
contained_by.

#version 3.7;
#include "colors.inc"
#include "stage1.inc"

difference{
    isosurface{ function{0.1-exp(-abs(pow(x*x+y*y+z*z,0.5)-0.75)/0.1)}
        threshold 0 accuracy 0.0001 max_gradient 10
        contained_by{ box{<-1,-1,-1e-6><1,1,1>}}
        texture{pigment{rgb Yellow}}
        }
    cylinder{ <0,0,0>,<0,0,-1>,1 texture{pigment{rgb Blue}} }

    rotate y*45 translate -z*2
}


Post a reply to this message

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