floor z = 0 ๐ฆ wall y = 0 ๐งฑ crease ๐ V ๐๏ธ P Q
graph LR A["๐งฑ 3-D object\nfaces + edges"] --> B["๐ฆ project from V\nฯ = VzยทPy โ VyยทPz"] B --> C{"crosses ฯ = 0 ?"} C -->|no| D["map whole face\n(one homography)"] C -->|yes| E["โ๏ธ clip into\nwall โ floor pieces"] D --> F["๐บ๏ธ unfold to the flat sheet"] E --> F F --> G["๐จ paint farโnear\n+ black outlines"] G --> H["๐ printable A4 SVG"] style A fill:#ffe0b2,stroke:#e65100,stroke-width:3px style B fill:#bbdefb,stroke:#1565c0,stroke-width:3px style C fill:#fff9c4,stroke:#f9a825,stroke-width:3px style D fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style E fill:#f8bbd0,stroke:#c2185b,stroke-width:3px style F fill:#d1c4e9,stroke:#5e35b1,stroke-width:3px style G fill:#b2dfdb,stroke:#00695c,stroke-width:3px style H fill:#eeeeee,stroke:#424242,stroke-width:3px
fold here (crease)
graph LR OBJ["๐ฆ object model\nfaces(colour) + edges"] --> SIG["ฯ classifier\nlinear form"] SIG --> CLIP["โ๏ธ SutherlandโHodgman\nhalf-plane clip"] CLIP --> MAP["ฯ projective map\nprojgeom.projective_transform"] MAP --> PAINT["๐จ painter sort\nโV โ cโยฒ"] PAINT --> SVG["๐ SVG writer\nmm, exact round"] subgraph "exact rationals ๐งฉ" SIG CLIP MAP end style OBJ fill:#ffe0b2,stroke:#e65100,stroke-width:3px style SIG fill:#bbdefb,stroke:#1565c0,stroke-width:3px style CLIP fill:#f8bbd0,stroke:#c2185b,stroke-width:3px style MAP fill:#d1c4e9,stroke:#5e35b1,stroke-width:3px style PAINT fill:#b2dfdb,stroke:#00695c,stroke-width:3px style SVG fill:#eeeeee,stroke:#424242,stroke-width:3px
Largest exact value vs integer width (log scale) int32 max ยท 2.1e9 int64 max ยท 9.2e18 chair 3.2e5 house 2.7e7 table 6.1e7 product ~1e15 ๐ overflows int32 โ๏ธ
graph LR PY["๐ Python\nFraction + projgeom"] -->|line-by-line port| CPP["๐ ฒโโ C++\nfun::Frac + fun::projective_transform"] CPP --> OUT["๐ chair ยท table ยท house\n(identical output)"] style PY fill:#bbdefb,stroke:#1565c0,stroke-width:3px style CPP fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style OUT fill:#d1c4e9,stroke:#5e35b1,stroke-width:3px