primers
A Universe in 280 Characters
Two viral sketches from @yuruyurau fit an entire animated artwork inside a single tweet. This is the whole trick, decoded line by line, with knobs you can turn.
October 10, 2026 · math · engineering · 8 min
The verdict
- A tweet-sized sketch is a masterclass in trigonometric composition: one polar plot, ten thousand points, and every number earns its place.
- The whole genre runs on one idea: radius and angle as functions of a sweeping parameter. Everything else is decoration on that idea.
- Once you see the skeleton, you can read any of these sketches like sheet music. Try it below: every slider is a live variable from the original code.
01The scene
In Japan there is a scene called つぶやきProcessing, "tweet Processing": creative coders who post generative art as code short enough to fit in a post, usually tagged #つぶやきProcessing. No libraries beyond p5.js, no assets, no build step. The code is the artwork, and the constraint is the art form.
These two from @yuruyurau went viral this week. Both are alive below, running their original math. Touch one and your finger stirs it.
The two pieces, live
Left: marbled ink, 10,000 points a frame. Right: silk ribbons, 20,000 points at a whisper of opacity. Both animate forever.
02The skeleton
Here is the ink piece in full. This is the entire program, all 280 characters of it:
a=(y,d=mag(k=(4+cos(y))*cos(i/7),e=y/5-11)-6)=>point((q=99+sin(t*2+e)*9+3*sin(k*2)+d*d*sin(t*2-d)+y/23*k*(e+sin(-d*4)))*sin(c=d/4-t/4+i%2*9)+200,q*cos(c)+200)
t=0,draw=$=>{t||createCanvas(w=400,w);background(9).stroke(w,166);for(t+=PI/60,i=1e4;i--;)a(i/299)}
Strip the golf and five parts remain:
- The clock.
tis time. Every frame it grows byPI/60, so one full sine cycle takes two seconds. Everything that moves reads this clock. - The loop.
for(t+=PI/60,i=1e4;i--;)a(i/299)plots ten thousand points per frame.icounts down from 10,000 and each point getsy = i/299, a parameter sweeping from 0 to about 33. - The field. Inside
a(y), two helper values are cooked fromy:k, a wobbling horizontal coordinate, ande, a vertical drift. Thend = mag(k,e) - 6measures distance from a moving point. This is a distance field, the same idea as a topographic map. - The radius.
qis the star of the show: a base radius of 99, modulated by four sine terms. Every bump and streak in the artwork lives in this one expression. - The plot.
point(q*sin(c)+200, q*cos(c)+200)drops each dot at polar coordinates: radiusq, anglec, centered at (200, 200).
That last line is the whole genre in miniature. Radius and angle, both functions of a sweeping parameter. If you remember one sentence from this primer, remember that one.
03Building the ink, one layer at a time
Watch what each ingredient contributes. Same math, same ten thousand dots, ingredients added one by one:
Four layers of the same sketch
Frozen at the same instant so you can compare. Each layer keeps everything from the one before.
d*d*sin(t*2-d) term folds the distance field back into the radius. Ripples interfere, and the streaks appear.04The playground
Six variables straight out of the original code, live. Drag them and the artwork above obeys. The presets jump to interesting corners of the space.
Bend the ink yourself
This canvas runs the original math with your numbers. Everything resets when you reload.
05One variable, six pictures: the split
The i%2*9 term is the strangest line in the sketch, so it deserves its own gallery. It rotates every odd-numbered dot by 9 radians relative to the even ones. Here is what happens as that rotation grows from 0:
The split dial, 0 to 4π
Same instant, only the split changes. Notice 2π: a full turn puts the odd dots exactly back where they started, so the pair merges into one ring again. 9 radians is 2π plus 2.72, which is why the original sits just past reunited.
06One variable, six pictures: the ripple
The d*d*sin(t*2-d) term is the marbling. d is distance from a moving point, so this term paints concentric ripples of radius distortion that travel outward as time flows. Scale it and watch the streaks dissolve or take over:
The ripple dial, 0 to 3
At 0 the ink goes smooth and a little boring. At 1, the original balance. Past 2 the ripples shred the form into static.
07The second piece: silk
The silk sketch is the same skeleton wearing different clothes:
a=(y,d=mag(k=(5+3*sin(y+4))*cos(i/7),e=y/5-9)-2.8+sin(t-k*k/9))=>point((q=3*sin(k*2)+k*y/25*(d*2.5+2*sin(e*6-d*5+t*3)))+6*d*cos(c=d-t)+200,q*sin(c)+d*39)
t=0,draw=$=>{{t||createCanvas(w=400,w);background(9).stroke(w,46);for(t+=PI/240,i=2e4;i--;)a(i/885)}}
- Twenty thousand points instead of ten thousand, each drawn at alpha 46 instead of 166. That is the whole secret of the silk look: twice the dots at a quarter of the brightness, so overlapping strokes build up like watercolor.
- Time runs four times slower (
PI/240per frame), and it leaks into space:sin(t-k*k/9)means the distance field itself breathes, so the ribbons drift instead of just shimmering. - The plot is lopsided. The x term adds
6*d*cos(c)while y stretches byd*39, so the form smears diagonally instead of blooming radially. Same polar idea, different posture.
08How it fits in a tweet
Half the artistry is the compression. A few of the tricks that squeeze a universe into 280 characters:
- Default parameters as assignment.
a=(y,d=mag(k=...,e=...)-6)=>computesk,e, anddinside the parameter list itself. Three variables declared for the price of zerovarstatements. - The loop variable leaks on purpose.
iis global, so the plot functiona()reads it directly forcos(i/7)andi%2. No arguments passed, no scope wasted. - One letter does triple duty.
w=400sets the canvas size, then doubles as the stroke color:stroke(w,166)asks for white level 400, which p5 quietly clamps to 255. - Time advances inside the for statement.
for(t+=PI/60,i=1e4;i--;)ticks the clock in the initializer, saving a whole line. - Chained setup.
background(9).stroke(w,166)returns the p5 object, so two setup calls share one statement. Andt||createCanvas(...)builds the canvas exactly once, on the first frame whentis still zero.
None of this is obfuscation for its own sake. Every trick buys characters, and the characters buy sine terms, and the sine terms buy beauty. The constraint is doing compositional work: it forces the artist to find the shortest path to the image, and the shortest path is usually the most elegant one.
Sources
- @yuruyurau, ink sketch, October 10, 2026. The marbled yin-yang piece.
- @yuruyurau, silk sketch, October 9, 2026. The wispy ribbon piece.
- p5.js reference:
createCanvas,point,mag, and the color clamping that makesstroke(400)legal.
Keep exploring
The same atoms, different molecules.
Sines all the way down
Sound, light, JPEG, MP3. Sine and cosine are the atoms of repetition, and these sketches are built from nothing else.
The math you called useless is running your life
School taught math as computation, and computers took that job. What is left is math as a way of seeing, which is exactly what a distance field is.
Black holes are buggy
Another case of math becoming an image: the thin rings on the black hole page are a famous graphics bug, kept on purpose.
Yuru ink, the interactive pair
Both sketches recreated verbatim and running full-screen, with a finger interaction: touch the canvas and the ink parts around it.