Space Colonization
Grow a tree with the space colonization algorithm: scatter attraction points in a crown shape, start from one root, and let every branch tip grow a short step towards the points near it, removing each point once a branch reaches it. Set the number of points, the radius of influence, the kill distance and the segment length, pick an ellipse, round, wide, cone, box or heart crown, a leaf outline or roots, and change the seed for a new tree. Branch widths follow the pipe model, so the trunk is thickest and the tips are thinnest; show the points as grey dots, or draw light branches on a dark background. Download a PDF, a 300 DPI PNG or an SVG with every branch as a vector line. Nothing is uploaded.
100% private — everything runs in your browser. Everything runs in your browser; nothing is uploaded.
Print at 100% (Actual size). Real size prints on one sheet when the drawing fits; the check bar in the footer lets you confirm the scale. The SVG holds the drawing at the printed size.
Growth
Distances are in crown units: the crown is 100 units wide.
Look
Page
Runs in your browser with our own code: nothing you type is uploaded or saved. Every branch is grown by our own space colonization code from the seeded points, and every width comes from the pipe model. You may use what you make here, including commercially, with no credit needed.
How to grow a tree with the space colonization algorithm
- Pick a preset, or choose a crown shape and the number of points.
- Set the radius of influence, the kill distance, the segment length and the seed.
- Choose the pipe-model exponent, the tip width, the colours and the background.
- Choose Fitted to one page or Real size and the paper.
- Download the PDF and print at 100% (Actual size), or the PNG or SVG.
What you can use it for
- Tree, root and vein-like line art
- Computer graphics and procedural-modelling lessons
- Plotter, laser-engraving and vinyl line art from the SVG
- Backgrounds for cards, covers and posters
- Comparing kill distances and point counts
- Starting points for illustration
The 16 presets
| Preset | Crown | Points | Influence | Kill | D | Nodes | Tips | Points removed | Rounds | Stopped | Trunk width |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Ellipse crown, 600 points, D = 2 | Ellipse crown | 600 | 30 | 4 | 2 | 441 | 60 | 598 | 68 | no new branch possible | 0.77 mm |
| Round crown, 700 points | Round crown | 700 | 30 | 4 | 2 | 535 | 77 | 698 | 77 | no new branch possible | 0.85 mm |
| Wide, flat crown | Wide, flat crown | 600 | 30 | 4 | 2 | 313 | 41 | 600 | 58 | every point reached | 0.66 mm |
| Cone (pointed crown) | Cone (pointed crown) | 700 | 30 | 4 | 2 | 458 | 62 | 700 | 79 | every point reached | 0.78 mm |
| Box-shaped crown | Box (rectangle) | 800 | 30 | 4 | 2 | 561 | 75 | 798 | 69 | no new branch possible | 0.84 mm |
| Heart-shaped crown | Heart | 700 | 30 | 4 | 2 | 477 | 71 | 698 | 77 | no new branch possible | 0.83 mm |
| Leaf outline: vein-like branching from the base | Leaf outline (vein-like) | 900 | 25 | 3 | 1.5 | 985 | 116 | 898 | 100 | no new branch possible | 0.8 mm |
| Roots: growing down into a half ellipse | Roots (half ellipse below) | 700 | 30 | 4 | 2 | 344 | 48 | 700 | 34 | every point reached | 0.71 mm |
| Sparse: 150 points, kill distance 8 | Ellipse crown | 150 | 30 | 8 | 3 | 141 | 16 | 148 | 46 | no new branch possible | 0.76 mm |
| Dense: 1,800 points, kill distance 2.5 | Ellipse crown | 1,800 | 30 | 2.5 | 1.5 | 971 | 139 | 1,790 | 91 | no new branch possible | 0.58 mm |
| Short reach: radius of influence 12 | Ellipse crown | 600 | 12 | 4 | 2 | 427 | 64 | 598 | 71 | no new branch possible | 0.79 mm |
| Pipe model exponent 2 (thick trunk) | Ellipse crown | 600 | 30 | 4 | 2 | 434 | 61 | 598 | 69 | no new branch possible | 0.94 mm |
| Pipe model exponent 3 (slim trunk) | Ellipse crown | 600 | 30 | 4 | 2 | 434 | 61 | 598 | 69 | no new branch possible | 0.79 mm |
| With the attraction points shown | Ellipse crown | 300 | 30 | 4 | 2 | 366 | 51 | 300 | 70 | every point reached | 0.72 mm |
| Light branches on a dark background | Round crown | 600 | 30 | 4 | 2 | 508 | 82 | 598 | 75 | no new branch possible | 0.87 mm |
| Real size: 120 mm wide | Ellipse crown | 600 | 30 | 4 | 2 | 442 | 51 | 600 | 68 | every point reached | 0.72 mm |
Distances in crown units (the crown is 100 units wide). Every count is worked out by the tool from the tree it draws.
How the kill distance changes the tree (ellipse, 600 points, seed 1, D = 1.5)
| Kill distance | Nodes | Tips | Points removed | Rounds |
|---|---|---|---|---|
| 2 | 788 | 129 | 592 of 600 | 92 |
| 3 | 653 | 90 | 598 of 600 | 92 |
| 4 | 566 | 54 | 594 of 600 | 91 |
| 6 | 440 | 25 | 600 of 600 | 89 |
| 8 | 350 | 22 | 600 of 600 | 89 |
| 12 | 250 | 11 | 600 of 600 | 87 |
The pipe model: trunk radius = tips^(1/n)
| Exponent n | Tips | Trunk radius (tip radii) | Tips^(1/n) | Trunk width at 0.15 mm tips |
|---|---|---|---|---|
| 2 | 60 | 7.746 | 7.746 | 1.16 mm |
| 2.25 | 60 | 6.17 | 6.17 | 0.93 mm |
| 2.5 | 60 | 5.144 | 5.144 | 0.77 mm |
| 2.75 | 60 | 4.432 | 4.432 | 0.66 mm |
| 3 | 60 | 3.915 | 3.915 | 0.59 mm |
Ellipse preset, seed 1. The trunk radius is worked out branch by branch from the tips down, and equals the number of tips to the power 1/n.
What prints
| Download | What is in it |
|---|---|
| The tree fitted to one page or at real size, vector lines, with the counts and a check bar | |
| PNG 300 DPI | The same sheet as a picture |
| SVG | Every branch at the printed size as vector lines, one path per line width, and the points if shown |
For a cutter that needs DXF, use SVG to DXF.
Which tool to use
| You want | Use |
|---|---|
| Trees grown towards scattered points | Space Colonization (this page) |
| Branching grown by a field simulation | Lichtenberg Figure |
| L-system curves and fractals | Fractal Generator |
| Cell patterns from scattered points | Voronoi Generator |
| Soft organic shapes | Blob Generator |
Other tools: the Fractal Generator renders L-system curves and fractals, the Voronoi Generator draws cell patterns and the Blob Generator makes organic shapes.
More free tools
Maths art, patterns and printables?
Drawing and print tools that run privately in your browser, with no sign-up and no watermark.
Frequently asked questions
What is the space colonization algorithm?
A way to grow branching structures from a set of attraction points, described by Adam Runions, Brendan Lane and Przemyslaw Prusinkiewicz in Modeling Trees with a Space Colonization Algorithm (Eurographics Workshop on Natural Phenomena, 2007). It adapts the leaf venation algorithm of Runions and colleagues (ACM Transactions on Graphics, 2005) to trees. Branches compete for space: each point pulls only the branch closest to it.
How does it work?
Each round, every point picks the tree node closest to it, if that node is nearer than the radius of influence. Every node picked by one or more points grows a new node a segment length D away, in the direction of the average of the unit vectors towards its points. Then every point that has a node nearer than the kill distance is removed. Rounds repeat until no point is left in reach. Our tests check that every new node is exactly D from its parent and that every removed point had a node within the kill distance.
What do the three distances do?
The radius of influence sets how far a point can pull, the kill distance how close a branch must come before the point is used up, and the segment length D how long each new piece is. In the 2007 paper fewer points and a larger kill distance give sparser crowns; the table on this page shows the counts for one seed. The kill distance must be larger than D and smaller than the radius of influence.
What is the pipe model?
A rule for branch thickness from Shinozaki and colleagues (1964), used in the 2007 paper: where branches of radii r1 and r2 meet, the branch below has radius r with rⁿ = r1ⁿ + r2ⁿ, where n is usually between 2 and 3. Every tip starts at the same radius, so the trunk radius works out as the number of tips to the power 1/n; the table checks it. The printed width is the tip width times the radius, rounded to 0.01 mm.
Why does the trunk grow straight first?
Our addition: when no point is yet within reach of the root, the root grows straight towards the centre of the points in steps of D until one is. The paper starts from one or several tree nodes and does not fix this part.
Is it the same as an L-system or a fractal tree?
No. An L-system rewrites a string of symbols by fixed rules, and a fractal tree repeats the same branching at every scale; this algorithm has no branching rule at all, the branches go wherever the points pull them. The Fractal Generator on this site draws L-system curves.
Is the leaf preset the leaf venation model?
No. The 2005 venation model also grows the leaf and adds new points as it grows; this preset puts all points in a fixed leaf outline at the start and runs the tree algorithm, so it gives a vein-like look, not the venation model itself.
Why did it stop?
The info line says why: every point was used up, no point is left within the radius of influence of the tree, a round added no new branch (when points pull a node equally in opposite directions), or a cap was reached.
How big can it go?
50 to 2,000 points, up to 1,000 rounds and 8,000 nodes; every preset draws in under 2 seconds in our tests.
Can it print at real size?
Yes, when the drawing fits on one sheet: choose Real size and set the printed width. Every printed point is within 0.2 mm of its true place in our tests, on US Letter and A4, as long as you print at 100% (Actual size); the check bar in the footer lets you confirm the scale. Bigger drawings print fitted to the page.
Is it free?
Yes. There is no sign-up, no watermark and no limit.
Is anything uploaded?
No. Every point and branch is worked out by JavaScript in your browser. Nothing you type is sent anywhere or saved when you close the page.