Animated Chaos Game in Grasshopper

I’ve been exploring Sierpinski geometry (chaos game) in Grasshopper as a simple example of how rules + randomness (Native components+Anemone) can generate highly ordered structure.
The process starts with a triangle and an initial point 𝑃0
The rule is:
put a random point inside the triangle (P0) → choose one of the corners (randomly) → find midpoint of them→ draw a line between the midpoint and a new random vertex → repeat.

Hi @Farzad1

Very cool work thanks for posting.

Many years ago I made a Seirpinski command script that had iterations one cut and pasted into the command line that basically did a very similar function. Mine was kind of made at that time to test how powerful one’s computer was because back then we could only display so much geometry.

Here are some blurbs from my old web page…

"This is also a great way to test Rhino and your machine to see how many polygons they can render.

Note
Don’t copy the complete command script at first.

I would copy the first iteration (up to the text Iteration1on the command script to the left) because it is a wonderful shape and Rhino can easily handle it for future rendering. I have it set up as the right mouse click on the Tetrahedron icon on my Polyhedra toolbox. (see last page for a free download if you don’t have it yet.)"

RM

it’s fascinating to hear about your early work using a Sierpinski command script as both a computational design challenge and a benchmark for hardware performance in Rhino.

Here’s a version I wrote in GHPython a couple of years ago:

Hi @diff-arch

Awesome I missed that post thanks for reposting!

RM

Hi @Farzad1

Thanks for your kind works, yours is much cooler, I would love to see a larger animation when you have time.

RM

I’ve shared my file and would greatly appreciate it if anyone could help optimize it using better components.

serpienski.gh (14.3 KB)