Written in 2026, backdated to 2022.
Joined a real estate firm mid-migration (C# to Java). The Java building design system lacked a geometry engine; project had stalled.
Small geometries (thousands of points)—mostly 2D. No frame budget or low-latency requirements. Numerical parity with Rhino 3D was mandatory.
Implemented Sutherland–Hodgman for polygon clipping, curve offsets, and largest inscribed rectangle.
Fortune’s algorithm for Voronoi diagrams was a missed opportunity. Implemented the first iteration of the beach line with an array (O(N2)) instead of the balanced binary tree (O(N log N)). Left unoptimized.
Reconciling floating point results was the hardest part.
Rhino 3D’s NURBS model was numerically incompatible with Apache Commons’ Binary Space Partitioning. Replaced BSP trees with point-based structures. JBLAS stabilized intersection results between systems. Retained BSP trees only for boolean operations.
Migration resumed. No regressions in the building layouts.