POV-Ray : Newsgroups : povray.binaries.animations : Things that went wrong. - ob01b.mpg (0/1) : Re: Things that went wrong. - ob01b.mpg (0/1) Server Time
19 Jul 2024 09:30:28 EDT (-0400)
  Re: Things that went wrong. - ob01b.mpg (0/1)  
From: Tim Nikias v2 0
Date: 29 Mar 2003 17:25:48
Message: <3e861d6c@news.povray.org>
Hm. As I stumbled upon this, Rune and Christoph had
made some experiments, and gave me a push
in the right direction:
1. Smoothen with more than just the four neighbours,
take the diagonal neighbours as well, but weight them
a little less.
2. The initial wave shouldn't be just a single point, I've
found that using 9 nodes (with the center one being
the highest) gives very pleasing results.

--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

>
> >Yikes!
> I like it.
>
> >What does your algorithm look like, how
> >does it interact with the objects, in order to get
> >that kind of effect? I don't understand why the
> >surface would suddenly rise to meet the
> >top rim of the containter, and then drop down in a
> >circular fashion as seen on the animation
>
> >(which you might have made smaller, the effect is clearly
> >visible on smaller scale as well).
>
> Sorry will do, in future :-(
>
> >Do you use that "magic algorithm", whic you can
> >find all over the net (and at Hugo Elias' page)?
> >
> Well the algorithm is, I assume, the "magic algorithm". I know it as the
water
> effect.
> Actually it's a variation of it using three arrays
>
> buffer(2, W, H) = ((buffer(1, W + 1, H) + buffer(1, W - 1, H) + buffer(1,
W, H +
> 1) + buffer(1, W, H - 1)) / 2) - buffer(0, W, H)
>
> // Swap the buffers
>
> buffer(0, x%, y%) = buffer(1, x%, y%)
> buffer(1, x%, y%) = buffer(2, x%, y%) - (buffer(2, x%, y%) * damp)
>
> buffer(2, x%, y%) = -1          'This line is what caused the
> surface to suddenly rise to meet the
> top rim of the container
>
> I'm sure you get the drift.
>
> For a circular edge, I ignored all elements that lay outside the circle in
the
> wave calculations. I must say that I'm no programmer (this is probably
obvious),
> and struggle with it. But it looked impressive I thought. I hope some
others
> will post interesting mistakes.
>
>
> Regards
>         Stephen


Post a reply to this message

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