I made Recursor just for that purpose! It allows you to customize the order of generating and drawing from a recursive stack, creating different animation behaviors
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…
3 Likes