I was playing with #SDFs while on a flight. I needed to figure out the distance of a point from a line, something I'd ordinarily do a quick search for and implement based on my findings. Without wifi, I thought "surely this is basic college stuff, I can figure this out." I did not figure it out, although I reminded myself of a lot of linear algebra. My math skills have gotten _very_ rusty! (Hint: if q is the point nearest p on line l, then l and pq are ⟂ so the dot-product is zero)
RT @iquilezles
New "Painting with Maths" (loooong) video in Youtube:
https://youtube.com/watch?v=8--5LwHRhjk
Made in Shadertoy (raymarched SDF): https://shadertoy.com/view/WsSBzh
#mathematics #sdfs #raymarching #procedural #shader