POV-Ray : Newsgroups : povray.binaries.images : SimpleFunction ... : Re: SimpleFunction ... Server Time
15 Aug 2024 22:19:54 EDT (-0400)
  Re: SimpleFunction ...  
From: Jan Walzer
Date: 16 Apr 2002 11:40:14
Message: <3cbc45de$1@news.povray.org>
now the idea of the function is, to take a suitable pattern (I took the bozo),
stretch it along the X-axis and then apply some noise in the Y+Z direction ...

this is quite simple done, but for easy tweaking I encapsulated it into
several functions, so the code is a mess and there are probably some
operations I could have spared ...

But if you really want to see the code, here it is:

#declare P_func=function(x,y,z) {
    f_bozo(x,y,z)
    }

#declare F=function(x,y,z) {
    P_func(
            x/20,
            y*3-f_noise3d(x+y*0.2,0,0)*5,
            z*3-f_noise3d(x+z*0.2,0,0)*5
          )
    }

#declare IsoMin=-x-2;
#declare IsoMax=x+2;

#declare MyIso=isosurface {
    function{F(x/0.4,y*4,z*4)}
    max_gradient 45.0
    threshold 0.2
    contained_by {
        box { IsoMin IsoMax}
        }
    }


Post a reply to this message

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