POV-Ray : Newsgroups : povray.binaries.images : Just toying around ... : Re: Just toying around ... Server Time
31 Jul 2024 22:08:57 EDT (-0400)
  Re: Just toying around ...  
From: [GDS|Entropy]
Date: 12 Mar 2009 05:28:58
Message: <49b8d5da$1@news.povray.org>
"Christian Froeschlin" <chr### [at] chrfrde> wrote in message 
news:49b8d25e$1@news.povray.org...
> [GDS|Entropy] wrote:
>
>> Thats freakin cool! :-D
>
> thanks ;)
>
>> How are you doing that?
>
> well it won't win a prize for stable numerics ;)
>
> #declare EPS = 0.0001;
> #declare F   = // some pattern function
>
> ...
>
>       // For object at <X,Y,Z>
>
>       #local DX = (F(X+EPS,Y,Z) - F(X-EPS,Y,Z))/(2*EPS);
>       #local DY = (F(X,Y+EPS,Z) - F(X,Y-EPS,Z))/(2*EPS);
>       #local DZ = (F(X,Y,Z+EPS) - F(X,Y,Z-EPS))/(2*EPS);
>       #local G  = <DX,DY,DZ>;
>
> Basically, I used F(X,Y,Z) for placement descision and object size,
> vlength(G) for elongation and the direction of G for orientation.
>

That idea inspires me to try some things. :-D
I need to wrap up the betas of the other macros I'm working on though before 
I start on anything new lol! ;-)

ian


Post a reply to this message

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