Inigo Quilez live-codes a cartoon character painting entirely from math, using signed distance fields in a Shadertoy shader. He explains each step of building the image from formulas.
Why Hacker News points people here: HN repeatedly calls it a mind-blowing and accessible introduction to SDFs and procedural art from a master explainer.
“he's a master of this stuff and a great explainer.”HN comment, 2022
“This was a mind blowing example of math and art from last year”
Mind-blowing math art with live coding
Full comment
This was a mind blowing example of math and art from last year - perhaps the live coding of the method was even more impressive than the outcome: this video
Strongly recommendssxpJan 2021
“is an amazing demo of their power.”
Amazing demo of signed distance fields
Full comment
If you don't have an understanding of signed distance fields, this video is an amazing demo of their power. There are more videos about the fundamentals of SDFs at link The interesting thing about this paper is that they replace the mathematical SDF with a neural net that computes SDF_NN(x,y,z) => -1/1 and use this as a compression system for mesh based inputs. This feels like a graphical version of the link for NN-based text compression.
Strongly recommendsgregsadetskyAug 2021
“Check out his incredible videos! Such as this mind-blowing one...”
Mind-blowing painting of a girl with maths
Full comment
Agreed. Check out his incredible videos! Such as this mind-blowing one... this video "Painting a Selfie Girl, with Maths"
Strongly recommendsnighthawk454Dec 2022
“he's a master of this stuff and a great explainer.”
Master explainer of SDFs painting a character with maths
Full comment
Great write up. If anyone wants to explore SDFs more, check out Inigo Quilez - he's a master of this stuff and a great explainer. Painting a Character with Maths: this video And plenty more on his website in article form: link Finally, Shadertoy, a graphics shader playground where you can see (and try!) a lot of this kind of stuff: link
Strongly recommendsdgellowApr 2023
“is mind-blowing and packed with SO MUCH educative content”
Mind-blowing, packed with educational content on creating art with maths
Full comment
I see a Inigo Quilez link, I upvote! He's one of those incredible artist-engineer out there always pushing boundaries further and sharing his ideas and techniques publicly. If you have some time today, watch a few of his videos on his youtube channel, it's incredible to see his creation process in action: link For example, "Painting a character with maths" is mind-blowing and packed with SO MUCH educative content: this video
RecommendslligalloJan 2021
“It makes a full 3d complex scene out of a math formula, with step by step explanation”
Builds a 3D scene from a formula step by step
Full comment
Checkout this video by the author. It makes a full 3d complex scene out of a math formula, with step by step explanation this video
RecommendsdominicjjApr 2021
“create a selfie of a girl from scratch using formulas here”
Creation of a selfie from scratch using formulas
Full comment
Demos are almost always generated and displayed at runtime. The music is composed of samples generated at runtime by additive synthesis which is just adding waveforms of differing frequencies together when you get down to it. It doesn't take many lines of code to produce CD quality instruments that can be arranged as a soundtrack. Today's 64k intros offload their drawing onto the GPU using shaders and a technique called raymarching which is a form of fixed-step raytracing that can be done in real time. Essentially the objects you see are painted with math: instead of thousands of vertices for a 3d fractal or a complex object, a formula is fed in to the ray marcher and it returns a shape with colors and lighting. Combining shapes using unions and intersections is then done and often the shape formula will take time as a parameter as well. To play with this concept yourself go to link and see how shader programs are rendered into incredible scenes with astonishingly few lines of code. For a wonderful look at the creation process, see the grandfather of raymarching Inigo Quilez create a selfie of a girl from scratch using formulas here: this video
RecommendslifthrasiirMay 2022
“also has made in-depth videos [1] [2] which might be more accessible to who aren't familiar with shader languages”
In-depth, accessible videos by Quilez
Full comment
Inigo Quilez, the author of this slide, also has made in-depth videos [1] [2] which might be more accessible to who aren't familiar with shader languages. [1] this video [2] link
RecommendsbrundolfMay 2022
“Check out this video for some crazy stuff you can do with equations”
Crazy things you can do with equations
Full comment
It's very similar to writing shaders. Check out this video for some crazy stuff you can do with equations: this video
RecommendspdpiMar 2023
“this video by one of its creators is probably worth watching”
Video by a Shadertoy creator
Full comment
And, if we're suggesting Shadertoy, this video by one of its creators is probably worth watching: this video
RecommendsantegamisouSep 2023
“be sure to check out, as the author cites, Inigo Quilez's videos”
Video alternative to the verbose article
Full comment
Good to see high quality articles gaining traction. If the article looks too verbose, be sure to check out, as the author cites, Inigo Quilez's videos Painting a Landscape with Maths - link Painting a Character with Maths - this video Bonus: Painting with Maths in Google Sheets - link
RecommendsemigreMay 2025
“it's a very interesting video.”
Interesting video by Quilez
Full comment
Check out 'Painting a Character with Maths' [1] (2020) by him, it's a very interesting video. [1] this video
RecommendsJareNov 2025
“this painting is a mathematical formula, a big function on the x and y coordinates of each pixel”
A painting that is a mathematical formula
Full comment
Obligatory "this painting is a mathematical formula, a big function on the x and y coordinates of each pixel" video from Iñigo Quilez. this video
Cites itt8yFeb 2022
“people appreciate that it's a shader, even people that are not into programming”
Making-of video for a shader artwork
Full comment
I don't think that people only value the output. Take "Selfie Girl"[0] by Inigo Quilez people appreciate that it's a shader, even people that are not into programming (though they'd need to see the making of video[1]). [0] link [1] this video
Cites itsilviotSep 2022
“This video [1] linked there shows how far you can get with this technique.”
Shows how far the technique can go
Full comment
Previous discussion: link (36 comments - sep 6th 2022). This video [1] linked there shows how far you can get with this technique. [1] this video
Cites itCyborgCabbageOct 2022
“He has a YouTube channel as well”
Quilez's YouTube channel
Full comment
He has a YouTube channel as well: this video Also you may like Marble Marcher made by Code Parade, it's a game that uses a similar approach to rendering: link
Cites itgcrMar 2023
“Inigo Quilez does some incredible stuff with signed distance fields!”
Incredible SDF work without textures
Full comment
Inigo Quilez does some incredible stuff with signed distance fields! Those don't use textures in the traditional sense, but see this video
Cites itvanderZwanJun 2023
Example of art generated without traditional assets
Full comment
Could you define "assets", please? What would you consider the assets in these videos by Inigo Quillez, for example? linkthis video
Cites itrozabAug 2025
“It's certainly not scalable, but it sure is interesting”
Interesting but unscalable SDF renderings
Full comment
This is of course true, but have you ever seen Inigo Quilez's SDF renderings? It's certainly not scalable, but it sure is interesting this video