POV-Ray : Newsgroups : povray.binaries.images : volcano WIP4 : Re: volcano WIP4 Server Time
7 Aug 2024 21:25:30 EDT (-0400)
  Re: volcano WIP4  
From: David El Tom
Date: 4 Feb 2006 03:32:39
Message: <43e466a7@news.povray.org>
Christoph Hormann wrote:
> St. wrote:
>>
>>    I'm having a job to see where it's flowing uphill?
>>
> 
> When i say "it should always flow downhill" this does not necessarily 
> mean it flows uphill in the image (although i am sure it does in some 
> places).  It is simply not taking the downhill direction everywhere 
> (i.e. the *steepest* direction going down).
> 
> Christoph
> 

should be not to hard to code a macro to trace a path with steepest descent.

(some kind of local monte carlo approach, similar to the methods used to find 
local minima of multi-dimensional hypersurfaces)

  - store the altitude of the current position
  - step forward
  - shoot rays in random fashion around the new position and trace the altitudes 
(the more you shoot the greater is the possibility to find the local steepest 
descent for this point)
  - compare thoose with the stored one and alter direction to the one with 
biggest difference
  - store this point as new position.

if you would store the gradient at each point you could use it reciprocal factor 
for the broadness of the lava flow, as it shoud get thighter if it flows faster 
and broader if it flows slower (constant flow rate).

another possibilty is to use the analytical derivative of the function you use 
for the volcano surface.


Post a reply to this message

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