DigitalArt.jl

The Julia package behind Hilbert & Turner — mathematics made into pictures, worked through the books of Farris, Bosch, and Dürer.

Where the command-line tools are for producing a finished image in under a second, this package is for exploration: every parameter is reachable, and the Pluto notebooks put the important ones on live sliders.

Installation

The package is not registered. From a clone of the repository:

using Pkg
Pkg.activate("DigitalArt/Julia")
Pkg.instantiate()
using DigitalArt

Everything is re-exported from the top level, so using DigitalArt brings the whole surface into scope regardless of which project a function belongs to.

Quick start

Build a curve from Fourier terms and draw 128 rotationally symmetric copies:

using DigitalArt

cs   = [1.0+0im, 0.5+0im, 0+im/3]
fs   = [1.0, 6.0, -14.0]
func = t -> μg(t; cs=cs, fs=fs)
t    = range(0, 2π, 1000)

fig, hist = drawZθfunc4b(func, t, chinese_red, mycolor, cfs3; n=128)
save("artwork.png", fig)

Layout

Shared utilities live directly in src/; code specific to one project lives in a subdirectory named for it.

ModuleProjectContents
CurvessharedCurve definitions, arc length, curvature
FourierCreating Symmetryμg (general curve), fkm (selective Fourier sum)
SymmetryCreating Symmetrydrawfunc, drawZθfunc4b
SymmetryColorsCreating SymmetryHSLA color generators and state machine
TextLayoutText ArtText-along-curve layout: layout_text, PlacedGlyph
TextRenderText ArtDrawing placed glyphs: render_glyphs, save_render
TruchetTilesOpt ArtTile geometry: TruchetTile, truchet_grid, white_area
TruchetColorOpt ArtColor: ChannelTile, truchet_color_grid
TruchetImageOpt ArtImages to tile grids: truchet_from_image
ToneOpt ArtImage to ink density: density_field, load_density
StippleOpt ArtInitial point placement: initial_points
MacQueenOpt ArtThe relaxation: relax!, learning_rate
TourSolveOpt ArtNear-optimal TSP: optimize_tour, greedy_tour
TourCrossingsOpt ArtThe Jordan guarantee: remove_crossings!
TourSmoothOpt ArtCatmull–Rom smoothing: smooth_tours

Curves sits in src/ rather than under a project because both Creating Symmetry and Text Art build on it. A module belongs in src/ only once a second project needs it; until then it stays with the project that introduced it.

The API Reference covers all 29 modules.

Guides

Four hand-written guides cover the parts where knowing the function signature is not enough:

  • Fourier Curves — how cs, fs, k, m, M, and as change what you see
  • Color System — color families, the mycolor state machine, and designing cfs arrays
  • Symmetry RenderingdrawZθfunc4b, the hist return value, how curve shape and rotation count interact
  • Text on Curves — the layout/render split, real FreeType metrics, auto-fit

Notebooks

DigitalArt/Julia/notebooks/ holds one Pluto notebook per module (*.pl.jl), each demonstrating the key functions with interactive @bind controls. Launch with:

using Pluto; Pluto.run()

The Rust companion

The Opt Art work has a Rust port — two command-line binaries, roughly 30–40× faster, golden-tested against fixtures generated by this package. It is a companion rather than a replacement: this code stays the substrate for the notebooks.

See the command-line documentation and its fidelity notes, which record exactly what matches between the two implementations.