#XQuery
#GenerativeArt interlude
Constrained walks
A few days ago I posted some grids made by taking Delannoy numbers mod something
Delannoy numbers have application for determining how many distinct constrained walks you get of a certain type in grids of various sizes
Here we constrain to → ← ↓ ↑
I don't forbid backtracking

#GenerativeArt interlude
So there I was playing with Turing patterns, starting with an SDF field as a seed, and I started to like the seeds too
So: SDF fields
The Elder God opens its eyes

#GenerativeArt interlude
Delannoy numbers (a thread)
There's kinda sorta 2D Fibonacci numbers
D(a,b) = D(a,b-1) + D(a-1,b) + D(a-1,b-1)
D(0,b)=D(a,0)=1
If you take them mod some number and plot the grid, interesting patterns arise

I just completed "Trebuchet?!" - Day 1 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/1
#Xquery #Xpath
#GenerativeArt interlude
Speaking of those multi-level Turing patterns, here's another one
The heart of the engine

#GenerativeArt interlude
Fake fossilized tree rings
Because waiting for those multi-level Turing patterns to finish gets boring

#Saxon HE/PE/EE 12.4 erschienen. #XSLT #XQuery https://www.saxonica.com/about/news.xml
#GenerativeArt interlude
More multi-level Turing patterns, a movie
Watch as they emerge from the murk and shift and twist
Initialized using SDF of a symmetrical arrangement of packed rings

#GenerativeArt interlude
Ouchi's illusion: the disk seems to float above the plane
Scroll up and down for a stronger effect
(Start of thread with many variants)
#GenerativeArt interlude
Yes, more of these
I'm in love with how you get order from the chaos with just a bias in the starting search angle instead of a random search angle
Hypnotic
#GenerativeArt interlude
What if you implemented an improved Bridson's algorithm for generating random points?
Well, OK, points, but...
#GenerativeArt interlude
Guilloché patterns, formed by adding a little offset into parametric curves involving sines and cosines to create a dense overlay of curves
It gets used a lot for security features on money because a small change in parameters produces a large detectable change in result
So, a kind of pseudo-asemia here: bills from the Bank of Mary
(Shows better on screen if you expand)
#GenerativeArt interlude
Curlicue fractals
θ[n+1] = (θ[n] + 2πs) mod (2π)
φ[n+1] = θ[n] + φ[n] mod (2π)
θ[0] = φ[0] = 0
s = irrational number
Draw unit line between iterations
A parametric l-system may not be the most efficient way to do this, but it was the readiest to hand in the moment...
(edit:correct colophon)



#GenerativeArt interlude
More multi-level Turing patterns
I do love 'em, but at any reasonable resolution and with enough iterations to get interesting it takes... yawn... a long time to run

#GenerativeArt interlude
Verdigris
Multi-level Turing patterns, per McCabe (http://www.jonathanmccabe.com/Cyclic_Symmetric_Multi-Scale_Turing_Patterns.pdf)

#GenerativeArt interlude
What have we here?
Circlemap: t[n+1] = (t[n] + Ω - K/2π sin(2πt[n])) mod 1
t[j] is fraction along circle
Run a number of generations, shrinking the circle each generation, plot the results
K=0.86, Ω=0.22

#GenerativeArt interlude
Origami
It violates the rules of origami because I allow cuts, but I like the spare simplicity of it


#GenerativeArt interlude
Finally got my reaction-diffusion system running well enough to not take the whole damned day for non-trivial resolution
The colonnade in front of the Vatican

#GenerativeArt interlude
Cone shell
A study in projecting and rotating coloured helical paths.
Using a Q&D and rather wonky method for rendering so we see parts of the paths in front of the others

#GenerativeArt interlude
Phyllotaxis
A parametric L-system creates a spiral of hexagons. Showing multiple renderings where the angle of placement varies from 130 to 140 degrees.

#GenerativeArt interlude
New release
https://mathling.com/code/art/documentation/
The big thing here is the substantial rewrite/cleanup/extension of the L-System code
#GenerativeArt interlude
These stochastic parametric L-systems are pretty damned addictive
#GenerativeArt interlude
Achievement unlocked: parameteric L-system implementation
That, plus a WHOLE lotta refactoring, clean-up, and realignment of the L-system APIs in the next release, coming soon
(Aside: it is annoying that Mastodon puts a black background for edit/preview on images w/ no background colour even in light mode.)
#GenerativeArt interlude
She walks in night
Iterated complex function flowlines, again, but here we pick the complex function to have roots on a particular circle and the starting points from the bounds of a rough outline of a person. Hilarity ensues.
#GenerativeArt interlude
Vortex streams
Flowstreams from iterated complex functions; here a polynomial with N roots in the boundary zone, starting flows from edge of a circle
#GenerativeArt interlude
Redshift
Flow lines formed from iterated complex functions, starting from the edges
#GenerativeArt interlude
More flowering vines, experimenting with different colour combinations
Pastels
#GenerativeArt interlude
What if you applied the sin(sin(sin... trick to complex numbers?
1: decide what to do about results that get too large. I've played with various routes here: normalizing everything (BO-RING), reusing the value from the previous series, skipping bad values from plots
2: Running parametric function over t (double) what complex to use? t+ti? t+0i? t+i?
Here, Darth Vader is t+i, sequential constants, all sin, skip from plot
#GenerativeArt interlude
What if you plotted sin(t) and then sin(sin(t)) and sin(sin(sin(t)) and ...
What if you introduced constants, e.g. sin(2 sin(t))?
What of you mixed it up a bit and sometimes used cos instead?
Here's using Pascal sequence (with mod + 1) for constants and random sin/cos
#GenerativeArt interlude
This is a result of a bug, where the speckles of the fish get separated from their outlines, but I liked it so much, I decided to run with it and fix the bug some other day
#GenerativeArt interlude
Bee balm
Flow lines from iterated complex functions, starting at points sampled from a looping meander, used masks to expose parts of a photo underneath (of a bee visiting bee balm)
#GenerativeArt interlude
Flowlines using a complex polynomial of cos(z) with complex coefficients as the flow field and a smooth looping meander as the seed points
Given the recent influx, an #introduction
My background is #mathematics and #linguistics w/ eclectic interests. Sometimes attend/livetweet #astrobiology conferences just for fun. Spent career in #software (server-side #search #IR #database). Put in lotta miles on markup standards (#XML #XQuery).
Retired now, writing programs to make #GenerativeArt, post some here.
Fan of (lord help me) #WatfordFC #SJEarthquakes (#soccer)
Lots of curmugeonly opinions, which I sometimes share
#GenerativeArt interlude
WIP: Osculating circles
The nice thing about Bézier curves is that you can easily compute derivatives and therefore curvature with having to haul in some complicated numerical approximation
#GenerativeArt interlude
Music as a pattern-generator
I like the idea of music as a source of patterning for generative art: not quite regular, not quite random.
This bit of madness turns a musical score into a noise field by mapping the measures into a grid. The value of the function is based on the scaled pitch for the notes at that point in the grid. Values mapped to colour range.
Gloria from di Rocco's Mass for Pope Benedict, with the parts aligned.
#GenerativeArt interlude
The weird and wonderful world of continued fractions
The square root series (√j) with log colouring, using 0 for finite sequence terms, one line per j
The black bars are for the perfect squares 1, 2, 4, 9,... whose continued fraction (as with all rational numbers) terminates. Not sure what to make of that regular line of red dots for√22
#GenerativeArt interlude
Newton #fractal of the day
(2+1i)cos⁵(z)+(2+1i)cos⁴(z)+(2+1i)cos³(z)+(2+1i)²cos(z)+(2+1i)cos(z)+(2+1i)
Smoothed iteration colouring; "bukavu" gradient (a split topographic gradient, which is why you get hard boundaries from dark green to light blue; the sharp green-green lobes are not such artifacts)
Yes, it was a bug that made all the coefficients the same, but it turned out pretty for all that
#GenerativeArt interlude 1/3
More line fractals
Starting from pentagons or pentagonal stars
Starry McStar Face
#GenerativeArt #CreativeCoding #XQuery #SVG
The basic chaos game uses random vertex selection, perhaps constrained (e.g."don't pick the same vertex twice in a row").
I experimented w. integer sequences of various sorts, e.g. the Fibonacci, which you take mod the #vertices. If you just use the first N numbers of this sequence repeated, and N < #points, interestingly, you only get N distinct points plotted!
1/φ, regular pentagon: inventory, Recaman
The fraction 1/φ works really well in most cases.
Here we see how it behaves with 6 and 7 sides regular polygons with the vertex constraint that you can't pick the same vertex twice in a row
#GenerativeArt interlude
The chaos game (https://en.wikipedia.org/wiki/Chaos_game)
Map point to new point some fraction of distance to vertex of a polygon. Iterate. Depending on fraction, polygon, & constraints on which vertex you pick, you get different results, some of which are fractal in nature.
√5, regular pentagon, if two vertices in a row are the same, you can't pick one of the adjacent vertices (blue)
0.5, regular pentagon, you can't pick the same vertex twice in a row
#GenerativeArt interlude
More fun with circles
This arrangement from a random flip-inverse-reverse path with full symmetries, triangulated, rendered with a gradient fill.
Well, here's a bit of a head scratcher, and I'm open to any suggestions of where to even begin to look: I have a test (#XSL run by #Saxon with Java) that works perfectly well when run on the command line, but not when I put that command line in a make file. For that matter, a completely identical test in #XQuery runs perfectly well in both cases.
The failure mode is "impossible": an assertion that two values are the same fails, but the error stack shows them to be, in fact, the same.
So... you haven't seen my #GenerativeArt interludes in some little while. I've been busy with my quixotic quest to run some my art code under #SaxonJS, which meant porting from #XQuery to #XSL, which meant making some tools to do that because I am that kind of lazy, which meant figuring out how to do Saxon Java extension functions, but! Mirabile Dictu, it works. It all works... except... I have some odd performance issues that only happen in SaxonJS that I'm having narrowing down. Disappointing.
#GenerativeArt interlude
Flip-invert-reverse
#Genuary day 30: Minimalism
I love the simplicity (and performance) of this system.
#GenerativeArt interlude
#Genuary day 26: My kid could have made that
I set about to make something in the style of one of my daughter's old drawings, capturing some of the childish imperfections. Getting it sloppy enough but not too sloppy is pretty hard. Also, she has a much better sense of composition and colour than I could capture. (Original on left.)
#GenerativeArt interlude
Dots
#Genuary day 25: Yayoi Kusama
Contour field around a random smooth curl, rendered as dots.
Colours: Yayoi Kasuma hair + orange from the "oxygen" gradient
#GenerativeArt interlude
Genuary day 21: Persian rugs
Well, not so Persian, perhaps, but I like them. The weavings are driven off randomly selected integer sequences, with one driving the initial row, one driving how that evolves row by row, and one driving colour shifts.
#genuary2023 #genuary #genuary21 #XQuery #SVG #CreativeCoding
#GenerativeArt interlude
Asemic writing is my jam
Glyphs generated on a 3x4 grid with "letter", "word", "sentence" statistics based on English.
Genuary Day 14: Asemic
#genuary2023 #genuary14 #CreativeCoding #XQuery #SVG #asemic
#GenerativeArt interlude
Genuary Day 12: Tesselation
Isohedral tiling type 43 (a square tiling with edges of any kind), with wild edges and textured colouring.
#GenerativeArt interlude
Two stars dancing
#genuary2022 Day 2: made in 10 minutes
Recently cleaned up/refactored some of my coordinate mapping and curve plotting code; so grabbed some test code and added a small amount of parameterized randomness.
Here: Bipolar mapping of At sin(Bt) / Ct cos(Dt) for some mutually prime A, B and C, D
#GenerativeArt interlude
Escape plots
Given z[n+1] = f(z[n]) for some complex function f, count how many iterations it takes for the function to escape to infinity (really: some suitably huge number) and map that to colours.
Here cubic + c/quadratic:
f = (0.79z³+0.97z²+0.79z+-0.8)+(-0.37+0.12i)/(5z²+3z+-4)