Minkowski Penalties: Robust Differentiable Constraint Enforcement for Vector Graphics
Jirí Minarcík, Sam Estep, Wode Ni, Keenan Crane
Abstract
This paper describes an optimization-based framework for finding arrangements of 2D shapes subject to pairwise constraints. Such arrangements naturally arise in tasks such as vector illustration and diagram generation, but enforcing these criteria robustly is surprisingly challenging. We approach this problem through the minimization of novel energetic penalties, derived from the signed distance function of the Minkowski difference between interacting shapes. This formulation provides useful gradients even when initialized from a wildly infeasible state, and, unlike many common collision penalties, can handle open curves that do not have a well-defined inside and outside. Moreover, it supports rich features beyond the basic no-overlap condition, such as tangency, containment, and precise padding, which are especially valuable in the vector illustration context. We develop closed-form expressions and efficient approximations of our penalty for standard vector graphics primitives, yielding efficient evaluation and easy implementation within existing automatic differentiation pipelines. The method has already been “battle-tested” as a component of public-facing open source software; we demonstrate the utility of the framework via examples from illustration, data visualization, diagram generation, and geometry processing.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Cited by top-tier papers1
Ask how each one uses itRelated papers
- Robust Planar Maps for 3D VectorizationRobert Fuchs, Keenan CraneSIGGRAPH 2026
- Repulsive ShellsJosua Sassen, Henrik Schumacher, Martin Rumpf, Keenan CraneSIGGRAPH 2024 · 12 citations
- Marginalized Generalized IoU (MGIoU): A Unified Objective Function for Optimizing Convex Parametric ShapesDuy-Tho Le, Trung Pham, Jianfei Cai, Hamid RezatofighiAAAI 2026 · 2 citations
- Deep Parametric Shape Predictions Using Distance FieldsDmitriy Smirnov, Matthew Fisher, Vladimir G. Kim, Richard Zhang et al.CVPR 2020
- MiSo: A DSL for Robust and Efficient Solve and MInimize ProblemsFederico Sichetti, Enrico Puppo, Zizhou Huang, Marco Attene et al.SIGGRAPH 2025 · 1 citation
