|
![](/i/fill.gif) |
"Nekar Xenos" <nek### [at] gmail com> wrote:
> On Sat, 08 Aug 2015 05:09:58 +0200, Samuel Benge <stb### [at] hotmail com>
> wrote:
>
> > fractalforums
>
> After scrolling down, the next two images show these wonderful leaf-like
> fractals.
> Does anyone know the algorithm for these? I would really like to be able
> to use it off-off-topic :)
I know of at least two ways.
The first method has a seed layer (2D or 3D array), and a 1D array of particle
positions. Each particle moves around randomly (usually via Brownian motion)
until it detects a positive value on the seed layer. At this point it dies and a
value is added to the seed layer. Another particle is then introduced from some
convenient location, such as a screen edge. Since a particle rarely slips
between pixels before making contact, branching growth occurs.
The second method uses an additional 2D or 3D layer representing a solution
(instead of an array of particles). Every cell is evaluated at every frame. The
solution layer is 'saturated' at initialization. If the solution layer has
material to expend and a neighboring cell of the other layer has a positive
value, then material is added to that other layer and material is subtracted
from the solution. The solution is blurred each frame, which simulates diffusion
(albeit with some loss).
I hope that made sense :/ Maybe I'll get something going and upload it to
glslsandbox.
Post a reply to this message
|
![](/i/fill.gif) |