Most beauty per unit code
Share your favorite short programs that have beautiful output.
Any output modality, any programming language, any units.
Recording of output helpful but not required.
I think a program is more beautiful that doesn't generate identical output each time. But that's just my opinion.
My candidate is ~24 lines of LÖVE or equivalent. I'll share it a little later.
I suppose 10print is another candidate.
Thank you for asking! This is exactly what I need right now. Here is a Scratch version of my favorite Logo program from my childhood. scratch.mit.edu/projects/605658
I currently find a lot of these to be intriguing (click on "More...", too) forthsalon.appspot.com
For me that would be the formula for squircle - it's shape is just so pleasant to look at... (shadertoy.com/view/ll23DW)

@Jasmine Otto Interesting! knee-jerk thoughts and neuron firings:
a. Game of Life with fuzzy logic
b. Brusselator en.wikipedia.org/wiki/Brusselator (ref'd by Dr. Paul LaViolette's Subquantum Kinetics)
Paul Tarvydas Ooh, I haven't revisited the Brusselator in five years, thanks. I believe Varela et al. took inspiration from them via Foerester's BCL. Particularly from that evocative idea of chemical clocks.
Back in undergrad, I spent some time chasing down models of Drosophila segmentation as an example of a reaction-diffusion system exquisitely governed by signal hormone expression. So I'm very glad someone got those plots for Wikipedia to turn out. lukaswittmann.com/work/bachelors-thesis-the-brusselator
@Jasmine Otto
When I think of The Game of Life, I don’t see “equations”, I see “algorithm”.
When I look at the 4 “rules” of a Brusselator, I see “algorithm”.
(some thoughts, currently inconsistent)
programmingsimplicity.substack.com/p/brusselator-pondring-aloud?r=1egdky
📝 Brusselator - Pond’ring Aloud
2026-01-29
Here's my answer: 24 lines of LÖVE that simply rotate what you draw 48 times.
N = 48 -- numbers of axes of radial symmetry
Points = {}
Rotate = true
W, H = love.window.getMode()
function love.draw()
local g = love.graphics
g.setBackgroundColor(0.2,0.2,0.4)
g.setColor(0.8,0.8,0.8)
g.translate(W/2, H/2)
g.circle('fill', 0,0, 50)
for i=1,N do
g.line(-W,0, W,0)
if #Points >= 4 then
g.line(Points)
end
g.rotate(2*math.pi/N)
if not Rotate then break end
end
end
function love.keypressed()
Rotate = not Rotate
end
function love.mousemoved(x,y)
if not love.mouse.isDown(1) then
return
end
table.insert(Points, x-W/2)
table.insert(Points, y-H/2)
endI think of it as a mandala. The chicken scratches that yield it when seen without all the rotated copies.program. By using a computer you eliminate any possibility of meditation or transcendant peace 🙂 But on the other hand, it takes whatever my kids throw at it and makes it beautiful.


I'll be unoriginal and cite the classic Munching square. e.g. shadertoy.com/view/Mtsyz2 (I do love the grayscale variants, but the B&W shows the "munching" process best)
EDIT: and the / maze but now I see Kartik already mentioned it. [For more sophisticated maze algorithms, mazesforprogrammers.com is great fun.]
