DLA 3D

DLA 3D preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

(This model has yet to be categorized with any tags)
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 3D 4.1pre7 • Viewed 433 times • Downloaded 48 times • Run 0 times
Download the 'DLA 3D' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This is a 3D version of the 2D model DLA. This model demonstrates diffusion-limited aggregation, in which randomly moving (diffusing) particles stick together (aggregate) to form beautiful treelike branching fractal structures. There are many patterns found in nature that resemble the patterns produced by this model: crystals, coral, fungi, lightning, and so on.

HOW IT WORKS

The model begins with an initial green "seed" in the center of the screen. Red particles move around the screen randomly. When a red particle hits a green square, it "sticks" and turns green (and a new red particle is created to keep the process going).

HOW TO USE IT

Press SETUP to make the initial seed, then press GO to run the model.

The WIGGLE-ANGLE slider controls how wiggly the paths the particles follow are. If WIGGLE-ANGLE is 0, they move in straight lines. If WIGGLE-ANGLE is 360, they move in a totally random direction at each time step.

The MAX-PARTICLES slider controls how many red particles can exist at the same time.

Both settings may be altered in the middle of a model run.

The USE-WHOLE-WORLD? switch controls whether the red particles start at the edge of the screen, or from just outside a sphere enclosing the green area. If the switch is on, it's easier to see what's going on, but the model runs slower, particularly when WIGGLE-ANGLE is high.

THINGS TO NOTICE

Note that the resulting structure has a branching structure, like a tree. Why does this happen?

What other phenomena in the world do the shapes remind you of? Is this aggregation process a plausible model of how those phenomena occur?

When the enclosing sphere gets too near to the edge of the screen, the model stops, since allowing the particles to wrap around the edges of the screen would distort the shape of the aggregate.

New red particles are created not at the edge of the screen, but at the edge of a sphere enclosing the current size of the green aggregate, instead of traveling from the edge of the screen. Also, if a red particle wanders too far outside the sphere, it disappears and a new one is created. Neither of these behaviors is essential to the model -- it is done this way just to the model runs fast.

THINGS TO TRY

Try different settings for WIGGLE-ANGLE. What is the effect on the appearance of the resulting aggregate? Why?

Does the MAX-PARTICLES slider make any difference? Why or why not?

Do you think the USE-WHOLE-WORLD? setting has an effect on the appearance of the resulting aggregate? Why or why not? Experiment and find out. If you initially thought differently from what you found, why do you think you thought otherwise? Can you explain why it does happen the way you found?

EXTENDING THE MODEL

What happens if you start with more than one "seed" patch? What happens if the seed is a line instead of a point?

Can you find a way to modify the code so the resulting pattern spirals out instead of radiating straight out?

The rule used in this model is that a particle "sticks" if any of the eight patches surrounding it are green. What do the resulting structures look like if you use a different rule (for example, only testing the single patch ahead, or using NEIGHBORS6 instead of NEIGHBORS)?

Can you compute the fractal dimension of the aggregate?

If instead of using green, you gradually vary the color of deposited particles over time, you can see more vividly the accretion of "layers" over time. (The effect is also visually pleasing.)

The model will run faster if the turtles are invisible, so you may want to add a switch that hides them (using the HT command).

NETLOGO FEATURES

Note the use of the NEIGHBORS and DISTANCEXYZ primitives.

RELATED MODELS

The various models in the "Fractals" subsection of the "Mathematics" section of the Models Library demonstrate some other ways of "growing" fractal structures.

The "Percolation" model in the "Earth Science" section produces patterns resembling the patterns in this model.

CREDITS AND REFERENCES

The concept of diffusion limited aggregation was invented by T.A. Witten and L.M. Sander in 1981. Tamas Viczek's book "Fractal Growth Phenomena" contains a discussion, as do many other books about fractals.

HOW TO CITE

If you mention this model in an academic publication, we ask that you include these citations for the model itself and for the NetLogo software:

- Wilensky, U. (2006). NetLogo DLA 3D model. http://ccl.northwestern.edu/netlogo/models/DLA3D. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

- Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

In other publications, please use:

- Copyright 2006 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/DLA3D for terms of use.

COPYRIGHT NOTICE

Copyright 2006 Uri Wilensky. All rights reserved.

Permission to use, modify or redistribute this model is hereby granted, provided that both of the following requirements are followed:

a) this copyright notice is included.

b) this model will not be redistributed for profit without permission from Uri Wilensky. Contact Uri Wilensky for appropriate licenses for redistribution for profit.

This is a 3D version of the 2D model DLA.

Comments and Questions

Click to Run Model

globals [
  radius   ;; distance of the farthest green patch from the center
]

to setup
  ca
  set radius 0
  ask patch 0 0 0
    [ set pcolor green ]
end 

to go
  ;; stop when we get near the edge of the screen
  if radius >= max-pxcor
    [ stop ]
  ;; make new turtles, up to a maximum controlled by the MAX-PARTICLES
  ;; slider; also check clock so we don't make too many turtles too
  ;; soon, otherwise we get a big green clump at the center
  while [count turtles < max-particles and
         count turtles < ticks]
    [ make-new-turtle ]
  ;; now move the turtles
  ask turtles
    [ wander
      if any? neighbors with [pcolor = green]
        [ set pcolor green
          ;; increase radius if appropriate
          if distancexyz 0 0 0 > radius
            [ set radius distancexyz 0 0 0 ]
          die ]
      ;; kill turtles that wander too far away from the center
      if not use-whole-world? and distancexyz 0 0 0 > radius + 3
        [ die ] ]
  ;; advance clock
  tick
end 

to make-new-turtle
 ;; each new turtle starts its random walk from a position
 ;; a bit outside the current radius and facing the center
 crt 1
   [ set color red
     tilt-up asin (1.0 - random-float 2.0)
     ifelse use-whole-world?
       [ jump max-pxcor ]
       [ jump radius + 2 ]
     tilt-up 180
     ; set random roll, so when we start wiggling, there's no bias.
     roll-right random-float 360
]
end 

to wander   ;; turtle procedure
  ;; the WIGGLE-ANGLE slider makes our path straight or wiggly
  roll-right random-float wiggle-angle - random-float wiggle-angle
  rt random-float wiggle-angle - random-float wiggle-angle
  tilt-up random-float wiggle-angle - random-float wiggle-angle
  fd 1
end 


; Copyright 2006 Uri Wilensky. All rights reserved.
; The full copyright notice is in the Information tab.

There are 3 versions of this model.

Uploaded by When Description Download
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Model from NetLogo distribution Download this version
Uri Wilensky over 14 years ago DLA 3D Download this version

Attached files

File Type Description Last updated
DLA 3D.png preview Preview for 'DLA 3D' over 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.