POV-Ray : Newsgroups : povray.binaries.images : Calculating water flow : Re: Calculating water flow Server Time
1 Aug 2024 10:18:15 EDT (-0400)
  Re: Calculating water flow  
From: Kirk Andrews
Date: 11 Dec 2008 17:05:00
Message: <web.49418e03b440b799b555cae70@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> "Kirk Andrews" <kir### [at] tektonartcom> wrote:
> > Well, I think I've solved that problem by using a different technique now.
> > Earlier I was trying to use triangles to create the pond surfaces, now I'm
> > simply using a cylinder which is easier and has more benefits anyway.
>
> Awesome! Please share your results in either case. I have a planetary surface
> pigment that could benefit from such a technique.
>
> -Mike

Well, I'm on another computer right now so I don't have the code I used, but it
really is quite simple.  This is the basic idea:

1.  Choose random staring point on surface (using trace).
2.  Using trace, check the altitude of several points at a specified radius.
3.  Choose the lowest of these points as the current direction and new starting
point. Create a cone between old point and new point.
4.  If the altitude of the lowest point is actually higher than the starting
point, create a pond (using a cylinder at the altitude of the lowest point).
5.  Repeat X times to create a whole stream.
6.  Repeat the whole thing X times to create more streams...

It could be improved by developing a better way to simulate the accumulation of
water.  In this method, the potential size of any body of water is quite small.
 I would like to be able to fill up whole lakes (or oceans in you case,
perhaps?).


Post a reply to this message

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