|
|
> //Line Integral Convolution Pattern Functions
> #declare LIC_F_Forward = function(x,y,z, S,H,N){
> sum(M,0,N-1,
> LIC_F_Ramp_Down(M,N)
> *LIC_F_Pattern(
> (x+H*sum(I,0,M,F_granx((x+H*I),y,z)))/S,
> (y+H*sum(I,0,M,F_grany(x,(y+H*I),z)))/S,
> (z+H*sum(I,0,M,F_granz(x,y,(z+H*I))))/S
> ))/N
I should note that this method of gradient ascent isn't correct, but seems to
provide a reasonable approximation. AFAICT, A correct SDL implementation would
need to use a recursive function, or a macro to build a proper ascent function.
Post a reply to this message
|
|