POV-Ray : Newsgroups : povray.beta-test : Isosurface problem? : Re: Isosurface problem? Server Time
2 May 2024 03:01:24 EDT (-0400)
  Re: Isosurface problem?  
From: Alain
Date: 31 May 2013 01:40:18
Message: <51a837c2$1@news.povray.org>

>
> Granted, I don't realy know about isosufaces but copied an example from the
> tutorials, but with the following code I don't get a sphere but a perfectly
> smooth cube
>
> // Test code
>
> #version 3.7;
>
> #include "colors.inc"
> #include "functions.inc"
>
>
>
> light_source {< -400, 1000, -500>, color 1.0  }
>
>
> global_settings {
>      ambient_light 0
>      noise_generator 3
>      assumed_gamma 1.0
>      }
>
>
>
> #declare SimpleBlock =
> isosurface{
> function {
>    f_sphere( x, y, z, 2.6) -
>      f_noise3d( x, y, z ) * 0.5
>      }}
>
>
> object { SimpleBlock pigment { red 0.5 }}
>
> plane { y, -25 pigment { Gray50 }}
>
> camera {
>    location <2, 1.5, -6>
>    look_at 0
>    direction z *   1.0
>    right image_width / image_height * x
> }
>
> // End code
>
> Most likely I'm doing something wrong. but fail to see what.
> Any hints appreciated.
>
> Running povray 3.7.0 RC7 on opensuse 12.3
>

The default contained_by for an isosurface is:
box{<-1,-1,-1>,<1,1,1>}

The 2.6 in f_sphere mean that you want a sphere with a radius of 2.6 unit.
By substracting f_noise3d, you push the surface outside by up to 0.5 unit.

This mean that you need a contained_by object larger than the default.

You can use:
sphere{0,3.1}
OR
box{-3.1,3.1}

To improve rendering speed, you need to make the contained_by object as 
tight as possible without clipping the intended shape.

If you get holes in the surface, look at the message after the image is 
completely rendered. You'll get a message informing you about the 
largest gradient found. Adjust max_gradient to that value or a little 
smaller. Often, a value within 5 to 10% lower than the raported value is 
good enough.



Alain


Post a reply to this message

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