FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Simulation, Artificial Life
(Moderator: REAS)
   Diffusion Limited Aggregation in Water Ice
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Diffusion Limited Aggregation in Water Ice  (Read 3491 times)
Fish-face

308232952308232952thedemonsheep WWW Email
Diffusion Limited Aggregation in Water Ice
« on: Mar 14th, 2005, 9:11am »

Hi,
 
I've recently been studying the phenomenon of diffusion limited aggregation (DLA) For those of you who don't know what it is, it's a system whereby particles in solution diffuse randomly until they move near to a piece of solid structure, at which point they come out of solution and form part of the aggregate.
This system tends towards dendritic structures, and is responsible for the pattern in crystals of zinc in the electrolysis of zinc sulphate.
 
More interestingly, it is also the process by which snowflakes and frost form, and this is ultimately the process I wish to simulate.
The problem I am encountering is that pixels are a very large, very square unit to use when dealing with what is an atomic phenomenon. In particular, to simulate ice it is necessary to have units that display rotational symetry to order six. I'd like to know your thoughts on how best to simulate this - I've thought of scaling the system down for viewing, but this would probably result in huge amounts of computing power.
Any other general thoughts about how best to translate a large-unit medium into a macro-model would be much appreciated.
 
Another problem I've been pondering is how to simulate nucleation sites properly. Looking at http://www.metafysica.nl/ontology/ijsbloem_6a.jpg you can see that frost generally follows branches, and grows much slower on the branch sides than at the branch tip. Not quite sure of the science behind this, so it's difficult to work out exactly how to simulate it.
 
I should probably point out that I will be doing this in C/Xlib, not in Processing, but you're insanely clever guys, so I'm asking you, anyways!
I'm not going to paste the code. (it's pretty big) So you can find it at www.fishface.a.la/repository/dla.c Please note that this server goes down every night (That's GMT night) and that the code requires the xscreensaver source to build.
« Last Edit: Mar 14th, 2005, 5:57pm by Fish-face »  

--

The C@ S@ on the M@
=Fish-Face=
~#Chris#~
Fish-face

308232952308232952thedemonsheep WWW Email
Re: Diffusion Limited Aggregation in Water Ice
« Reply #1 on: Mar 14th, 2005, 8:02pm »

One thing I didn't mention above was that there are, naturally, other ways of simulating this phenomenon. I'm not as well versed with them, however, so if you know about a more direct method of simulating frost or snowflakes, I'd be much obliged.
Particularly snowflakes - I was wondering whether it would be possible to calculate the diffusion gradient around an object and thus the growth rate at any point on the surface. This is more conducive to snowflakes due to their scale. Crystallisation of the solute occurs virtually evenly all over the surface, whereas the DLA method leads to irregularities.
The problem is then working out how branches are formed - something that I do not know, both for the simulation and in real life. I assume it's something to do with growth becoming unstable due to its speed or something, but I really have no idea.
 
Again, ideas welcome.
 

--

The C@ S@ on the M@
=Fish-Face=
~#Chris#~
Mike Davis

WWW
Re: Diffusion Limited Aggregation in Water Ice
« Reply #2 on: Mar 14th, 2005, 8:44pm »

Here's a page explaining how to create a hex grid based on a rectagular grid: http://hex.alife.co.uk/map/index.html.  You can use a regular 2D array, and consider only a certain 6 of the 8 adjacent cells to be next to the center cell.
 
DLA is a very cool model with a lot of applications, from crystals to coral to city development.
 
A few years ago I wrote a C program that builds 3D DLA models and outputs POV-Ray scene files for rendering.  You might find it interesting: http://www.lightcycle.org/workspace/dlatool/index.html.  Instead of a grid, the particles move in space and stick when they're within a certain distance of the structure.  Old, clunky code but it works and the output is pretty.
 
I can't wait to see what you come up with.  Have fun!
 
Fish-face

308232952308232952thedemonsheep WWW Email
Re: Diffusion Limited Aggregation in Water Ice
« Reply #3 on: Mar 14th, 2005, 10:37pm »

Well, by virtue of a symlink, the code at the above URL should be always up-to-date, and essentially I think I've come across an important limitation.
The dendritic structures occuring in ice (snowflakes, especially) are mainly accounted for by a uniform diffusion gradient, with variations in local temperature and saturation causing slower or faster growth. This produces the more uniform structures.
Although at its heart it is DLA driven, I believe that for a simulation it is more fruitful to calculate the gradient and therefore growth rate at each particular point on the crystal. How this will be done I am still grappling with.
 
Thanks for the info on the hexagonal grids - I'm not sure whether I'll be able to actually use it. Another problem I'm thinking about is using a more vector orientated system - the solute I have currently will only crystalise if it is directly adjacent to the current aggregate. I'd like the particles in solution to be able to move to a finer degree than their size - hence brownian motion rather than a 1 pixel hop in 4 cardinal directions.
 

--

The C@ S@ on the M@
=Fish-Face=
~#Chris#~
Fish-face

308232952308232952thedemonsheep WWW Email
Re: Diffusion Limited Aggregation in Water Ice
« Reply #4 on: Mar 15th, 2005, 11:09pm »

Update:
 
Well, DLA is old. New is:
 
www.fishface.a.la/repository/snow.c
 
Here I am simulating a diffusion gradient, which basically means that stuff should grow faster, the nearer the edge it is. At the moment there is a bug that causes irregular growth; I'll try to iron it out.
 
One thing I'm particularly please with is that the way in which more 'growth' is added in corners creates a faceting tendency. The problem now is firstly getting rid of the aforementioned irregularity, and tweaking the constants so I obtain a balance between the different tendencies of the aggregate. I will then introduce random variations that should hopefully produce snowflake-type patterns.
 
I overcame the problem of pixel units by making a pixel crystalise when its growth variable was raised above 1. This produces a smoother growth.
 

--

The C@ S@ on the M@
=Fish-Face=
~#Chris#~
Pages: 1 

« Previous topic | Next topic »