Project Record
Maps Optimisation (Planar Ellipses)
Topology optimizer for overlapping project or entity nodes represented as ellipses in planar space.
Context
Project atlases and entity maps often show many nodes (projects, funds, strategies) as shapes in 2D. When nodes are placed by semantic coordinates or user drag, overlaps become hard to read. This optimizer adjusts positions so that ellipses (or circles) stay close to their intended anchors while reducing visual collision.
Problem
Given a set of ellipses with initial positions and optional anchor points, we want a layout that minimizes overlap and keeps nodes readable. Constraints: keep the layout in a bounded plane and avoid large jumps so that the map remains recognizable after each update.
Goal
Keep nodes near their anchors while minimizing overlap in a constrained plane.
Objective
For each pair of ellipses, we penalize normalized distance below 1.
Repulsion resolves collisions, attraction maintains layout continuity. Total cost is overlap penalty plus anchor-distance penalty; we minimize via gradient descent or a small solver step.
Implementation
- Input: ellipse centers, radii (or axes), optional anchor (x,y).
- Cost: sum of pairwise overlap terms + anchor pull (e.g. squared distance to anchor).
- Optimizer: L-BFGS or similar; bounds on (x,y) to keep nodes inside the viewport.
- Used in the atlas dashboard to refresh layout when relations or coordinates change.
Trade-offs
Global minimum is not guaranteed; we often run from current positions so the result is a local improvement. For very dense graphs, overlap may remain; in that case we rely on zoom or clustering in the UI.