Making a heart with Maths

Channel:Inigo Quilez · Length:10:13 · Published:2017-02-24 · Views:112143

Watch on YouTube

Summary

Inigo Quilez shows step by step how to build a simple heart shape from mathematics and shaders, with code on Shadertoy. It is an introduction to procedural graphics and signed distance functions.

Why HN recommends it

HN commenters call it a great beginner-friendly introduction and enjoy watching Quilez work through graphics.

is a great introduction for beginners and younger people — HN, 2017

Computer graphics & rendering · Creative coding & generative art

Subtitles (excerpt)

hey guys um I thought I would make a new video today about uh mathematics and how you can use mathematics to create shapes and colors and movement and things like that which is my passion and because of that I did some videos before uh explaining how actual square roots and logarithms work in terms of making lighting and shapes but I won't do anything like that today today I just want to keep it simple and helped you understand that by using mathematics in a creative way you can have fun and do sculpting and lighting and things like that um and for that end I thought I would create a heart today a heart you know like those cheesy lovely red hearts um that we saw last week during s Valentine and I chose that shape because it's pretty easy to make with mathematics especially if you if you start with a sphere like the one I have here so a sphere has a very simple mathematical equation the equation for this one sphere actually is x^2 + y^2 + c^2 = 15 squared um 15 is the size of the sphere is the radius and of course I make it I can make it smaller I can make it five squared and then it becomes a tiny cute sphere or I can make it way bigger like 20 squared and then it becomes this big sphere but I'm

On Hacker News

Highly recommended video by Iquilez, in a similar vein: [VIDEO] Watching the guy hack away at graphics is super enjoyable — isoprophlex, 2020-02
His YouTube tutorial where he creates the beating heart composited on live video as he explains it is a great introduction for beginners and younger people [1]. I've learned so much from his sharing of his techniques and knowledge. Thanks Inigo! [1] [VIDEO] — eggy, 2017-09
I was expecting it to be the same algorithm in two different languages, but the Python version is a mathematical description whereas the C version is RLE-compressed. Relatedly, there is this video on how to procedurally generate a 3D heart: [VIDEO] — userbinator, 2019-02

Related videos