POV-Ray : Newsgroups : povray.binaries.images : Line Integral Convolution (LIC) : Re: Line Integral Convolution (LIC) Server Time
30 Jul 2024 00:17:19 EDT (-0400)
  Re: Line Integral Convolution (LIC)  
From: waggy
Date: 26 Apr 2013 13:20:01
Message: <web.517ab73d4a36c23821be1230@news.povray.org>
> //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

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