In the very very first iteration (before I was thinking about this deeply at all), I made this. https://github.com/ando818/creativegen/blob/master/moldpiece...

Basically you have some basic shapes like lines, rectangles and you can "weld" them together to form a mold, which could be joined together with other molds.

Then I created a pattern sequence with some basic transitions, like swapping positions or colors. https://github.com/ando818/creativegen/blob/master/pattern.p...

The program would then draw all the molds, and every 4,8,16, or whatever beats apply the transition from the pattern sequence. Ie every 4 beats swap, every 8 bits change colors. The idea was that you could form the pattern sequence quite easily and create interesting visuals that synced with music. I have some videos somewhere of this thing running, just not sure where they are.

Then I started thinking rectangles are really just composition of lines, lines are just composition of points. Transitions are just compositions of other transitions and I wanted to make everything out of the same thing. 4 years later honestly I don't have much to show for it. Its proven incredibly difficult and my ideas are all over the place. I've created literally 10-20 different implementations and started all over again. This is one of them.

https://pastebin.com/4J8dgAWu
The idea is that each node (pixel, object, or whatever) is a "transformer" which has a start and end which themselves are transformers with a start, end, next. Following a transformer's start transformer's next pointer should lead to its End (think input, transformation sequence, output). We run a transformer A with an instance of a different transformer B.
We iterate through the nexts of A's transformer and Bs transformer concurrently, at each step we apply the transformation from the A sequence to the B sequence. So for example, image B.start = 0, B.start.next = 1. And A.start = SameTransformer (copies the same value to the output) -> Diff Transformer(flips the bit). So running A.run(B) = a new transformation that takes the sequence 0,1, and returns 0,0. This new transformer C could then of course be used elsewhere as a part of another transformation sequence. So to transform 0,0,0,0, one could simply apply C,C to get transformer whose output is 0,1,0,1.

Its both linear and hierarchical, so one has the ability to jump over large steps (by immediately accessing the output, and not running through Start->End) of transformations if one is only interested in the outputs and not the computational steps that lead to that output. The hierarchy also allows the sequence to be treated as a single node as part of another sequence (hence applying Same to a subsequence can call same on everything below to copy it).

Ive used 0s and 1s here but instead imagine 0=Right and 1=Up. Then you can have a sequence of nexts that is something like right->up->right-up->up and run this as the input to a transformer that simply applies Same, Diff, replicating the sequence, and then copying the last value to get right->up->right-up->up->up.

So now imagine we make a transformer that flips the current bit, and the next bit (Diff, diff) and run it through the sequence 1,0,0,0,0,0. If we look at the output at each transformation step, we get 0,1,0,0,0 -> 0,0,1,0,0,0...
But since were simply following the next path of any arbitrary sequence, this transformer could be run over the right-up->right->-up->up sequence, producing a visual with each of these nodes changing color one at a time.

The bigger idea is to generate abstract sequences that make stuff bigger and bigger, or rotate them, or pull them apart, or replicate them in some projection etc.

Of course there is a simple way to do this in existing languages that would take short of 10 seconds :->

There's still plenty to think about it. If that's confusing welcome to my world.