algorithmic modeling for Rhino


I'm an architecture student using Grasshopper for a design task, I was wondering if anyone could help me with creating fractals. I want to form a fractal based on the sierpinski triangle but with circles, much like the one in this document :

The above site comes with the algorithms to create the fractal, but I'm not quite sure how to apply it in grasshopper.

Thank you in advance, I'm a newbie!

Views: 7749

Reply to This

Replies to This Discussion

That document creates a lot of intersecting circles, which is unlike sierpinsky fractals.

Since this is an iterative, or maybe even recursive, process, you definitely have no choice but to write a Script for it. I don't understand that paper either, mathematicians seem to go through a lot of trouble to make their work incomprehensible for others.

David Rutten
Poprad, Slovakia
that is way technical, but it is very possible to implement in grasshopper. at the bottom of the page there is a link to Curt McMullen's software called "lim" that draws fractals in postscript format. if you know C enough to at least understand what his code is doing, you should be able to take his code and port it to C# or even pretty easily. that being said, I don't actually know enough math to figure out the exact complex planes being used to generate that image.

summary: you will need a serious math genius, and you will definitely need some solid programming skills to get that in grasshopper. if you actually do tackle this challenge, you will essentially be implementing a fractal tool for grasshopper, which would be so cool. good luck!
Basic Mobius transformations are pretty straightforward to do with the complex number components in grasshopper.
I've attached an example definition.

As David said, you'd need to script to go much further with this, but if you do want to, there's a really great book all about Kleinian groups called Indra's Pearls. It has got some deep mathematics in it, but it assumes virtually no prior knowledge and it's full of cartoons and explanations in plain english and lots of pseudo-code (not a typical math book at all).
Hi Daniel

Nice definition... I am playing around with it and trying to understand it and modify it. My goal is to be able to get more control about where things are... the main goal is actually to create more "generators", or "centers"... do you have any tips on how to get there?

Good stuff man!

Daniel, did you ever try to do a Apollonian circle packing? Apparently the centers of its circles are defined by complex numbers and every circle has an integer curvature. I tried to get my head around X,Y values being the real and imaginary components of a complex number, but wasn't very successful so far. Here is also a nice article about this type of packing.


I don't know if anyone is still interested in this, but I was able to answer the original question here with a simple grasshopper definition using Hoopsnake for the recursion. The key is to use the CircleTanTanTan function. 

I just wrote a post about this on my blog, here. Attached is the Grasshopper definition.


That is a neat script David. Makes me want to try to code the nested Apolonian gasket

Rather slow but totally beautiful, thanks.


(1) Disable the evil preview-only-selected toggle:

(3) Right click Reset then Loop HoopSnake:

(4) Wait...forever....






  • Add Photos
  • View All

© 2018   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service