POV-Ray : Newsgroups : povray.binaries.images : Crackle - are we bored yet? : Re: Crackle - are we bored yet? Server Time
18 Apr 2024 17:27:34 EDT (-0400)
  Re: Crackle - are we bored yet?  
From: kurtz le pirate
Date: 3 Dec 2022 06:19:21
Message: <638b30b9$1@news.povray.org>
On 02/12/2022 21:48, Bald Eagle wrote:
> kurtz le pirate <kur### [at] gmailcom> wrote:
> 
>> This kind of code is a very big mystery to me :(
>> T-O-K also uses it a lot in his code about complex functions.
> 
> It doesn't need to be, and once you understand the basics of how it works, it's
> a very powerful technique that you can use a wide variety of purposes.
> 
> You can get a simple idea of how it all works by defining a simple distance
> function to any pixel.   vlength (x, y, z) is the Euclidian distance to any
> pixel from the origin.
> 
> So just do:
> 
> #declare Distance = function {vlength (x, y, z)}
> and then do
> 
> plane {z, 0 pigment {function {Distance (x, y, z}}
> 

LOL !
2.2.1.6 User-Defined Functions
...Excluded are for example strlen or vlength...



and thank you for this little example that sheds a little
light on my lantern




-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

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