Nightgraph: Putting Code to Paper with Rust
summary
nightgraph is a Rust creative‑coding stack that turns parametric shapes into SVG for pen plotters, with an interactive parameter UI that updates sketches live (native + wasm) and a graphics API that exposes concrete features: stroke generation, boolean ops like difference/offset, shape queries (area, centroid, intersections), and flattening to segments. demo shows e‑gui UI handling hundreds of thousands of line segments responsively; kerbo supplies robust bezier discretization; CLI is clap‑style. current gaps: no direct UI export, compiled sketches require rebuild, and scripting for third‑party code is experimental (gluon/mun explored).
AI-written summary · about
chapters (22)
- 0:00Introduction
- 2:28About me
- 3:47Plotters
- 4:35SVGs
- 6:20Initial Rust Works
- 7:52Language
- 10:37OpenCAD vs Pen
- 11:21Closed Shapes
- 13:01Nightgraph Components
- 14:20Nightgraph Shapes
- 17:00Shapes
- 17:53Centroid
- 18:14Canvas
- 18:36API
- 19:34Sketch
- 19:59Execution Context
- 20:12Clap
- 22:46Parameters
- 25:13Attributes
- 25:41Sketch List
- 26:21Nightgraph CLI
- 28:22param metadata
related talks
40mSketch-n-Sketch: Interactive SVG Programming with Direct Manipulation
02h 13m2D Graph scene in Rust
02h 03m2D Graph scene in Rust
19mSketch-n-Sketch: Output-Directed Programming for SVG
23mRust for Artists. Art for Rustaceans.
31mVector graphics rendering on the GPU in Rust with Lyon
18mThe Other Side of Go Programming Pictures
12mAlgorithmically Generated Visual Designs
