POV-Ray : Newsgroups : povray.general : Problem with isosurface : Re: Problem with isosurface Server Time
31 Jul 2024 00:30:47 EDT (-0400)
  Re: Problem with isosurface  
From: SharkD
Date: 8 Feb 2008 21:40:01
Message: <web.47ad11f843fac46b4cdeac580@news.povray.org>
Some more problems related to isosurfaces--this time with pigments. In the
following scene, there is noticable banding of the pigment in the form of
concentric circles around the centerpoint of the image. This problem occurs
regardless of the camera location. If you move the camera, there are still
concentric circles centered around the middle of the image.

//BEGIN
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3.6
// Desc: Basic Scene Example
// Date: mm/dd/yy
// Auth: ?
//


#version 3.6;

#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>
  rotate y * 45
}

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 Height_Ratio = 0.005;
#declare Water_Ratio = 0.75;

#local Pigment_Granite = pigment
{
 granite
 color_map
 {
  [0 rgbt 0]
  [1 rgbt 1]
 }
}

#declare My_iso_function = function
{
 pigment
 {
  pigment_pattern
  {
   crackle
  }
  pigment_map
  {
   [0 rgbt 0]
   [1 Pigment_Granite]
  }
  scale 1/2
 }
}

isosurface
{
 function { f_sphere(x, y, z, 1) + My_iso_function(x, y, z).transmit *
Height_Ratio}
 contained_by
 {
  sphere {0, 1}
 }
 pigment
 {
  onion
  color_map
  {
   [Water_Ratio * 000/100 rgb <000,000,050,>/255] //blue
   [Water_Ratio * 090/100 rgb <000,000,050,>/255] //blue
   [Water_Ratio * 099/100 rgb <034,180,180,>/255] //teal
   [Water_Ratio * 100/100 rgb <034,180,180,>/255] //teal
   [Water_Ratio + (1 - Water_Ratio) * 00/12 rgb <067,084,029,>/255] //green
   [Water_Ratio + (1 - Water_Ratio) * 08/12 rgb <067,084,029,>/255] //green
   [Water_Ratio + (1 - Water_Ratio) * 10/12 rgb <132,114,076,>/255] //tan
   [Water_Ratio + (1 - Water_Ratio) * 11/12 rgb <255,255,255,>/255] //white
   [Water_Ratio + (1 - Water_Ratio) * 12/12 rgb <255,255,255,>/255] //white
  }
  scale Height_Ratio
 }
}
//END


Post a reply to this message

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