POV-Ray : Newsgroups : povray.general : Trying to translate an isosurface function : Re: Trying to translate an isosurface function Server Time
29 Jul 2024 10:26:34 EDT (-0400)
  Re: Trying to translate an isosurface function  
From: Slime
Date: 13 Nov 2011 04:38:02
Message: <4ebf8ffa@news.povray.org>

 > different surface to that generated by the function outside of the 
pattern.
 >
 > #declare fn_myripples = function { // This doesn't work as expected
 >    pattern {
 >      function {cos(sqrt(x*x + z*z)*5*pi)*0.08}
 >    }
 > }

I believe patterns evaluate the function and then wrap the resulting 
value to the range [0,1). Since cos() returns negative numbers 
sometimes, they're getting wrapped around to higher values (for 
instance, -.3 becomes .7).

  - Slime


Post a reply to this message

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