{"by":"ianthehenry","descendants":38,"id":32738654,"kids":[32739349,32745597,32741780,32743038,32743232,32739291,32746055,32742910,32739200,32739260,32816842,32740610],"score":252,"text":"Bauble is a toy that I&#x27;ve been working on for a few weeks, and I think it&#x27;s reached the point where other people could have fun with it!<p>Bauble is based on raymarching signed distance functions, which are kind of like... 3D vector art? They&#x27;re pretty common in the procedural art community and you can do some amazing things with them, but normally writing SDFs means writing low-level shader code.<p>I wanted to play with SDFs, but I found it very frustrating to translate &quot;I want to rotate this&quot; into &quot;okay, that means I have to construct a rotation matrix, and then apply it to the current point, and <i>then</i> evaluate the shape...&quot;. So I made a high-level Janet DSL that compiles down to GLSL shader code so I could more easily play with mathematically defined shapes.<p>For more about SDFs, this mind-blowing video is what got me interested in the first place, and shows you what they&#x27;re capable of in the hands of an expert: <a href=\"https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=8--5LwHRhjk\" rel=\"nofollow\">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=8--5LwHRhjk</a>","time":1662478887,"title":"Show HN: Make 3D art in your browser using Lisp and math","type":"story","url":"https://bauble.studio"}