POV-Ray : Newsgroups : povray.general : Isosurfaces : Re: Isosurfaces Server Time
1 Aug 2024 06:27:01 EDT (-0400)
  Re: Isosurfaces  
From: Ger
Date: 15 Feb 2006 11:31:19
Message: <43f35757@news.povray.org>
Mike Williams wrote:

> 
> The problem with the Z_Step function is that there are points where the
> gradient is infinite. Since you're not setting max_gradient, POV is
> using the default value of 1, and you get this warning in the message
> pane:
> 
> Warning: The maximum gradient found was 3000.891, but max_gradient of
> the isosurface was set to 1.100. The isosurface may contain holes!
> Adjust max_gradient to get a proper rendering of the isosurface.
> 
> The "3000.891" value is just what POV happened to find on that run. If
> you were to increase the max_gradient to that value, it would take an
> awfully long time to render and still suggest a higher value.
> 
I tried setting it at 1000 but that sorta stopped povray dead in it's tracks

> Isosurfaces that have discontinuous functions will never render well.

I don't see the "discontinous" in the function because for every value of z
there is a determined value of y. But like I said, the last time I saw math
was 40+ years ago.

> 
> You might try this, which creates each slice of roof as a separate
> object and then places several of them side by side:
> 
> // creates a wavy shape along the x-axis
> #declare X_Wave = function { abs(sin(x*2.5)/4) }
> // creates a step shape along the z-axis
> #declare Z_Step = function { z*0.3}
> 
> #declare Slice =
> isosurface {
>         function {y+(X_Wave(x,y,z)+Z_Step(x,y,z))}
>         max_gradient 1
>         contained_by { box { <-2,-1,0>,< 2,0.55,1> } }
>         pigment { red 0.6 }
>         translate < 30,5,0>
>         scale 5
> }
> 
> #declare n=0;
> #while (n<10)
>   object {Slice translate z*n*5}
>   #declare n=n+1;
> #end
> 
> 

Thanks Mike, it works as I hoped it would come out.
Goes to show I should read up on math :)

-- 
Ger


Post a reply to this message

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