SDFSheetsa spreadsheet of signed distance functions

SDFSheets is an experimental spreadsheet interface for working with Signed Distance Functions. It's a continuation of exploring my interests in SDFs (SDF-UI, hiccup-sdf), spreadsheet-like interfaces (Protoboard) and Computational DAGs.

This project was a result of a nerd snipe from Avi Bryant who worked on a pretty similar exploration called Loglo.

If you want to play around with SDFSheets, check out the live demo.

This prototype provides a couple of very basic tools — a circle and a box, a way to translate and rotate the SDF, and CSG-like operations: union, subtract, and intersect:

CSG operations

You can also build your own SDFs from scratch by calling sdf() with a custom callback:

Custom donut SDF

As usual, this is just a prototype, and there's a bunch of obvious improvements that could be made:

  • the usual spreadsheet niceties:
    • click on another cell to insert a reference
    • smart references that work with copy-paste
    • referencing other cells by B2 instead of $("B2")
  • support for ranges, so we can sdf.union(B2:B5)
  • autocomplete for the code input