In a productive coding-on-the-train session I wrote a #Python-only renderer for SDFs (signed distance functions). SDFs are defined with #SymPy which brings the immense advantage of having it derive an analytical solution for the surface normals needed for shading.
What you see below is a first result of a rendered sphere pierced by three infinite cylinders of different diameters.
Code dump is here: https://gitlab.com/nobodyinperson/sdf-experiments/-/blob/main/SympySDF.ipynb
@nobodyinperson nice. Not crazy about the syntax (py-sdf feels nicer to edit), but it has potential
@rcarmo Sure, I'd make the syntax the same as py-sdf. That was just a first start.
@nobodyinperson one thing I’ve been meaning to do (and failed so far due to lack of time) is getting it to render the polygons for the STLin the GPU (brute force). This also has potential for speeding up the polygon generation massively.