POV-Ray : Newsgroups : povray.general : Problem with isosurface : Problem with isosurface Server Time
31 Jul 2024 00:34:32 EDT (-0400)
  Problem with isosurface  
From: SharkD
Date: 8 Feb 2008 17:40:00
Message: <web.47acd95f26eb41a7ce83de880@news.povray.org>
In the following scene, the transparent sphere causes holes to appear in the
isosurface so that you can see all the way through it to the background behind
it. Why is this happening?

//BEGIN
#include "colors.inc"
#include "functions.inc"

global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <2.0, 2.0, 2.0>
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <30, 30, 30>
}

// ----------------------------------------

#declare My_iso_function = function
{
 pigment
 {
  granite
 }
}

#declare Height_Ratio = 0.005;
#declare Water_Ratio = 0.75;

isosurface
{
 function { f_sphere(x, y, z, 1) + My_iso_function(x, y, z).gray * Height_Ratio}
 contained_by
 {
  sphere {0, 1}
 }
 pigment
 {
  onion
  color_map
  {
           [0 rgb 0]
           [1 rgb 1]
  }
  scale Height_Ratio
 }
}

sphere
{
 0, 1 - Height_Ratio * (1 - Water_Ratio)
 pigment
 {
  color rgbt 1
 }
}
//END


Post a reply to this message

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