# Recursive Sierpinski triangle (just a bit of fun)

**URL:** <https://discourse.processing.org/t/recursive-sierpinski-triangle-just-a-bit-of-fun/23546>\
**Category:** Gallery\
**Created:** [August 29, 2020, 10:54am UTC](https://discourse.processing.org/t/recursive-sierpinski-triangle-just-a-bit-of-fun/23546 "2020-08-29T10:54:41Z")\
**Posts on this page:** 1\
**Showing post:** 41

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [September 2, 2020, 11:24pm UTC](https://discourse.processing.org/t/recursive-sierpinski-triangle-just-a-bit-of-fun/23546/41 "2020-09-02T23:24:35Z")

</div>

What fun!

A while ago I wrote a small recursion library for animated recursion.

> [@Update screen during draw() without thread?](https://discourse.processing.org/t/update-screen-during-draw-without-thread/18599/5):
>
> If you want to be able to render progressively from an unbounded recursive process in a single thread – and don’t want to use thread() – then there are ways. I mentioned a linked data structure that acts as a recursion queue. I actually have a draft library I wrote that does that – “Recursor”. Supposing you start out with a basic recursive function that cannot be animated. It looks like this: void tree(float[] seg) { line(seg[0], seg[1], seg[0]+seg[2], seg[1]+seg[3]); PVector s = new PV…

It has an animated recursive serpinski triangle demo:

![export-714](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/3e262ec22cd8bcaef985591ea4a978ba6aa00694.gif)

---

_[View the full topic](https://discourse.processing.org/t/recursive-sierpinski-triangle-just-a-bit-of-fun/23546)._
