POV-Ray : Newsgroups : povray.advanced-users : Let the rivers flow Server Time
30 Jul 2024 04:10:34 EDT (-0400)
  Let the rivers flow (Message 1 to 10 of 10)  
From: kane
Subject: Let the rivers flow
Date: 10 Jun 2000 10:00:02
Message: <394249e2@news.povray.org>
Hi all, as part of a project I'm working on, I'm trying to create a macro in
either Pov or MegaPov that will create a river of sorts, a line of objects
on a hf.
  You'd just enter in the x,y,z of where it should start, and the macro
would then place an object there, then determine the next lowest point,
right next to the previous objects location, and place another object, until
it has either reached a predetermined length , reached the edge of the
object, or has reached a pool, or bottom where there is no more lower
points.
   Hope that makes sense.
Thanks ,
    Kane


Post a reply to this message

From: SamuelT
Subject: Re: Let the rivers flow
Date: 10 Jun 2000 14:56:28
Message: <39429000.6BAFC574@aol.com>
You might look into the trace function and maybe eval_pigment in MegaPOV. The
trace function will give you a xyz vector of any point on a heightfield,
eval_pigment will return the color of any point in space, as long as you give it
a pigment to test for. Hope that helps.


kane wrote:

> Hi all, as part of a project I'm working on, I'm trying to create a macro in
> either Pov or MegaPov that will create a river of sorts, a line of objects
> on a hf.
>   You'd just enter in the x,y,z of where it should start, and the macro
> would then place an object there, then determine the next lowest point,
> right next to the previous objects location, and place another object, until
> it has either reached a predetermined length , reached the edge of the
> object, or has reached a pool, or bottom where there is no more lower
> points.
>    Hope that makes sense.
> Thanks ,
>     Kane

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit my isosurface tutorial at http://members.aol.com/stbenge


Post a reply to this message

From: Christoph Hormann
Subject: Re: Let the rivers flow
Date: 10 Jun 2000 16:40:37
Message: <3942A7C5.1E1D2ABB@gmx.de>
For heightfields, you could use the "hf_height_at"-function, for
flowline calculation, you could check the erosion function in HF-Lab:

http://www.best.com/~beale/

Your idea is definitely worth trying even though I'm not sure if it
leads to useful results with common patterns.  

Christoph

--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Bob Hughes
Subject: Re: Let the rivers flow
Date: 11 Jun 2000 01:39:52
Message: <39432628@news.povray.org>
"kane" <ann### [at] mindspringcom> wrote in message
news:394249e2@news.povray.org...
| Hi all, as part of a project I'm working on, I'm trying to create a macro in
| either Pov or MegaPov that will create a river of sorts, a line of objects
| on a hf.
|   You'd just enter in the x,y,z of where it should start, and the macro
| would then place an object there, then determine the next lowest point,
| right next to the previous objects location, and place another object, until
| it has either reached a predetermined length , reached the edge of the
| object, or has reached a pool, or bottom where there is no more lower
| points.
|    Hope that makes sense.

Makes sense to me.
I have a crude example of such a thing (non-macro as of yet) only capable of
distributing some blob components along the lowest path just using the
hf_height_at in MegaPov.  If you are saying you are actually making something
yourself then I wish you much luck with it.

Bob


Post a reply to this message

From: SamuelT
Subject: Re: Let the rivers flow
Date: 11 Jun 2000 22:22:26
Message: <39444A07.B43591EE@aol.com>
Man, I wish there were erosion functions like that in POV..... I wonder
how to simulate it.....

Christoph Hormann wrote:

> For heightfields, you could use the "hf_height_at"-function, for
> flowline calculation, you could check the erosion function in HF-Lab:
>
> http://www.best.com/~beale/
>
> Your idea is definitely worth trying even though I'm not sure if it
> leads to useful results with common patterns.
>
> Christoph
>
> --
> Christoph Hormann <chr### [at] gmxde>
> Homepage: http://www.schunter.etc.tu-bs.de/~chris/

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit my isosurface tutorial at http://members.aol.com/stbenge


Post a reply to this message

From: Chris Huff
Subject: Re: Let the rivers flow
Date: 15 Jun 2000 10:26:43
Message: <chrishuff-FA0D9E.09305715062000@news.povray.org>
In article <394249e2@news.povray.org>, "kane" 
<ann### [at] mindspringcom> wrote:

> Hi all, as part of a project I'm working on, I'm trying to create a 
> macro in either Pov or MegaPov that will create a river of sorts, a 
> line of objects on a hf.
>   You'd just enter in the x,y,z of where it should start, and the macro
> would then place an object there, then determine the next lowest 
> point, right next to the previous objects location, and place another 
> object, until it has either reached a predetermined length , reached 
> the edge of the object, or has reached a pool, or bottom where there 
> is no more lower points.

I have done something similar to this...I made a particle with mass and 
affected by gravity and used multiple calls to trace() to make the 
height field repel it. The particles kind of hover and bounce around the 
height field until they find a low area with no slope or go over the 
edge. To make the height field repel the particles, I simply used a 
bunch of trace() calls pointed from the particles current position in 
random directions.
I might still have the source code somewhere...I could look for it and 
post it if you are interested.

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Mark Wagner
Subject: Re: Let the rivers flow
Date: 16 Jun 2000 00:50:13
Message: <3949b205@news.povray.org>
Chris Huff wrote in message ...
>I have done something similar to this...I made a particle with mass and
>affected by gravity and used multiple calls to trace() to make the
>height field repel it. The particles kind of hover and bounce around the
>height field until they find a low area with no slope or go over the
>edge. To make the height field repel the particles, I simply used a
>bunch of trace() calls pointed from the particles current position in
>random directions.


Now, with the proximity pattern, this can be done automatically with the
eval_pattern() function.  Should make writing such things much easier.

Mark


Post a reply to this message

From: kane
Subject: Re: Let the rivers flow
Date: 16 Jun 2000 20:22:21
Message: <394ac4bd@news.povray.org>
> I have done something similar to this...I made a particle with mass and
> affected by gravity and used multiple calls to trace() to make the
> height field repel it. The particles kind of hover and bounce around the
> height field until they find a low area with no slope or go over the
> edge. To make the height field repel the particles, I simply used a
> bunch of trace() calls pointed from the particles current position in
> random directions.
> I might still have the source code somewhere...I could look for it and
> post it if you are interested.

I would definetely be interested...thanks


Post a reply to this message

From: Chris Huff
Subject: Re: Let the rivers flow
Date: 20 Jun 2000 17:54:29
Message: <chrishuff-42F2AF.16585120062000@news.povray.org>
In article <3949b205@news.povray.org>, "Mark Wagner" 
<mar### [at] gtenet> wrote:

> Now, with the proximity pattern, this can be done automatically with the
> eval_pattern() function.  Should make writing such things much easier.

Something similar could be done(in fact, this is what gave me the idea 
for the proximity pattern), but my algorithm may have done more than 
just proximity tests(I don't really remember though...).
Still, the proximity pattern could be used to make something close to it 
with much faster parsing.
I will dig up the source and post it when I have a chance(an incoming 
severe thunderstorm may slow me down).

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Chris Huff
Subject: Re: Let the rivers flow
Date: 22 Jun 2000 10:55:58
Message: <chrishuff-68FCEF.10002222062000@news.povray.org>
In article <chrishuff-42F2AF.16585120062000@news.povray.org>, Chris 
Huff <chr### [at] maccom> wrote:

> I will dig up the source and post it when I have a chance(an incoming 
> severe thunderstorm may slow me down).

I apparently deleted the file while spring cleaning...fortunately, the 
scene was pretty easy to duplicate. Posted in povray.text.scene-files as 
"Flow.pov".

I might expand on this, adding water flow/spray effects, friction, etc, 
but this demonstrates the basic technique. I used trace() because not 
only the proximity but the direction is needed...eval_pattern() could 
still be used, but you would have to use several calls of the function 
to determine the general direction.

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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