Funktor
Erik Swahn · 2023
Each *Funktor* is defined by a sequence of mathematical functions called signed distance functions. This type of function describes the relationship between the interior and exterior of shapes, yielding negative or positive values depending on whether a point in space belongs to the inside or the outside of the shapes they describe, and values close to zero for points on the boundary between them. In that sense, they are like architectural drawings, only instead of lines, they use the the value zero to mark the boundaries between outside and inside - in other words, walls. A room, in this context, is therefore a region of space that return negative values when its defining function is sampled. In *Funktor*, a simple sequence of such functions is defined, then twice extruded and interpolated, as if going from floor to floor, with the previous level transforming into the next through simple linear interpolation. There are no surfaces, only a field of points at regular intervals, sampled in space. For values close to zero, there's a coloured dot. In that way, only the boundaries between inside and outside are visible, sometimes floating in space, sometimes standing firmly on a ground plane. You can press '1' to '5' to export PNG image files of increasing resolution. You can press 'e' to export an STL file that can be used for 3D printing, or 'o' to export an OBJ file. You can also press 'g' to export a GIF animation and 'p' to repaint the Funktor. Note that the STL and OBJ files can be very large. *Funktor* is part of the exhibition *Generative Architecture* and was written in Javascript using p5.js in 2023.
How it works
main.js defines signed-distance functions (fScene, fRect, fCircle, fGradient, credited to IQ) sampled over a 3D field and oblique-projected as plotted dots, with voxel-to-triangle STL/OBJ export.
The core is plotting a solid field defined by signed distance functions (SDFs) as stippling. main.js defines distance functions such as fScene, fRect, fCircle and fGradient (inspired by Inigo Quilez) and samples values on a 3D xyz grid. Instead of shooting rays, it obliquely projects the points that satisfy a threshold and plots them as plotter-like uneven dots. Further, it converts the voxelised shape into triangles and can export a 3D mesh as STL / OBJ — a design premised on three-dimensional modelling. The smooth form synthesis by SDFs and the hand-drawn-like dot plotting, two textures, coexist. The combination of distance functions, the projection and the density change per token, so the style ranges from the geometrically neat to the rough and grainy.
Palette
#f0f8ff#faebd7#00ffff#7fffd4#f0ffff#f5f5dc#ffe4c4#000000#ffebcd#0000ff#8a2be2#a52a2a#deb887#5f9ea0#7fff00#d2691e#ff7f50#6495ed#fff8dc#dc143c#00008b#008b8b#b8860b#a9a9a9#006400#bdb76b#8b008b#556b2f#ff8c00#9932cc#8b0000#e9967a +216 more #e6e7dc#e0c0b2#538774#be9782#afcdc7#81ada4#3e523d#9d4b5f Algorithms
- Raymarching with SDFs primary · classification: LLM
- 3D Mesh / Geometry · classification: LLM
- Plotter-style Hatching · classification: LLM
Details
Sources
- IPFS ipfs.io ↗
- Source verse.works ↗
Related works (by shared algorithms)
Last updated 2026-07-16