POV-Ray : Newsgroups : povray.advanced-users : macro or include files : macro or include files Server Time
29 Jul 2024 06:15:04 EDT (-0400)
  macro or include files  
From: Stephen McAvoy
Date: 25 Oct 2002 12:17:12
Message: <3db96b51.198279891@news.povray.org>
Does anyone know of a macro or include file to simulate waves on the
surface of a fluid? I don't want to reinvent the wheel.
 I'm thinking of something like:

loop
          Buffer2(x, y) = (Buffer1(x-1,y)
                           Buffer1(x+1,y)
                           Buffer1(x,y+1)
                           Buffer1(x,y-1)) / 2 - Buffer2(x,y)
 
          Buffer2(x,y) = Buffer2(x,y) * damping
      end loop

Taken from 
http://freespace.virgin.net/hugo.elias/graphics/x_water.htm

I wrote something to do the job in QB but I am no programmer and
cannot get it to work with an array larger than 121 x 121.

Thanks Stephen


Post a reply to this message

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