Some tinkering inspired by @bitartbot ; first art thing in a long while. Feels nice to be a bit creative again.

#generative #generativeart #proceduralart #noai #processing #ps5

@bitartbot I'm going to bed now but one more cool one (zoom in!).

red: f(x, y) = (x & (x + (((((4 | 14) * (y | y)) * x) + (y & x)) + (x & (x | (x - x))))))
green: f(x, y) = ((x & (x % x)) | (y * ((y * y) * x)))
blue: f(x, y) = (((-11 | (y + ((x & (y & 1)) * x))) | (((-5 + -1) | ((y - ((x % y) % x)) | (x | x))) % x)) + (x - (y | x)))

red: f(x, y) = ((y - (y - (2 * (y - y)))) & (y | (x | y)))
green: f(x, y) = ((x - (y * (y - y))) & y)
blue: f(x, y) = (((x | x) & (x * ((y % (y + x)) | x))) + 3)
@heavyimage There’s y-y in there 🤔
@compfu well observed! The equations are generated randomly so this can happen. There’s already a TODO in the code to do an optimization pass to remove or simplify nodes or groups of nodes :-)
@compfu eg in addition to algebraic identities (such as x-x=0), a set of nodes that are all constants could be collapsed into a single value.
@heavyimage the result looked very pretty though.
@compfu yeah -- having parts of the tree resolve to constant values doesn't break the technique -- it's just inefficient.

@compfu Got a simple version of this working -- so satisfying:

f(x, y) = ((((floor(tan(tan(-1))) % sin(cos(2))) % tan((x ** ~(1)))) | (((y | sin(-2)) // (x + ((1 | y) / ((floor(floor(-1)) // floor(-1)) * floor(max(((min(-(x), 0) ** floor(1)) ** y), (y ** y))))))) ** ~(-1))) % -2) (length: 217!)

SIMPLIFIES to:

f(x, y) = (((-0.005818788 % tan((x ** -2.0))) | (((y | -0.034899496) // (x + ((1 | y) / (NaN * floor(max(((min(-(x), 0) ** 1.0) ** y), (y ** y))))))) ** 0.0)) % -2) (length: 164!)

@compfu each node in the equation tree gets traversed and if the children are all constant (eg, don't contain x or y) they can be replaced with a single value node containing the value they (always) resolve to.
@compfu just noticed that NaN ah well :-)
@heavyimage sneaky. What does the result look like? Or does it fail to render?
@compfu In the event of an arithmetic error, we just return 0. So likely that entire equation will just return 0 for all points. Since I create 3 functions (one for each of RGB) that'll probably result in an image without one of those channels.