|
![](/i/fill.gif) |
Sorry I cant really use this unless you tell me where the variables nx, ny, nz,
epsilon came from.
triple_r wrote:
> some_yahoo <209### [at] gmail com> wrote:
>> no - I am doing a different color in each frame. I only have a clock variable to
work with. There are no nested loo
> ps
>
> Weird. I thought I responded already, but it didn't show up. Oh well.
>
> #declare x=floor(clock*nx)/(nx-1);
> #declare y=floor(clock*nx*ny)/(ny-1);
> #declare z=floor(clock*nx*ny*nz)/(nz-1);
> #while (x>1+epsilon) #declare x=x-1; #end
> #while (y>1+epsilon) #declare y=y-1; #end
> #while (z>1+epsilon) #declare z=z-1; #end
>
> Then map the clock onto a nested loop. This may be what you've done already,
> but the above code does it also, for x, y, z in [0,1] with nx, ny, and nz
> discrete steps (you'll have to change x,y,z to something else, of course). You
> could use mod(), but the while loops avoid looping back to zero, as you ran
> into, for epsilon < 1/min(dx,dy,dz). Of course you could also just map it onto
> RGB coordinates, but HSV seems somehow more appropriate.
>
> - Ricky
>
>
>
Post a reply to this message
|
![](/i/fill.gif) |