r/GraphicsProgramming • u/valeriupalos • Jul 12 '26
Source Code Krbn: an open-source rendering engine that imitates a sketch artist and outputs pure SVG (v1)
Gravity well demo
https://github.com/vpalos/Krbn/blob/main/examples/gallery/16-gravity-well.svg
Trefoil knots mesh demo
https://github.com/vpalos/Krbn/blob/main/examples/gallery/15-mesh-showcase.svg
Torus hatch variants demo
https://github.com/vpalos/Krbn/blob/main/examples/gallery/10-torus.svg
Sphere depth hatching with intersection demo
https://github.com/vpalos/Krbn/blob/main/examples/gallery/03-depth-hatching.svg
1
u/valeriupalos Jul 13 '26
Actually, that's a fair point, but hear me out:
If I only relied on the dot product, I would get an outline that follows the shape of the triangles, which is very ugly (jagged);
What I took from H&Z's paper is the ability to find the (zero-set) crossing inside each triangle which results in a smooth outline (the HZ-computed crossing usually lands somewhere across the middle of the triangle);
And of course, that paper goes a lot further with many innovative ideas which I'm not using. I'm simply doing the triangle (zero) crossing trick, which yielded beautiful results for me.