If you find this interesting, you might enjoy my write up of the Matoušek-Sharir-Welzl (MSW) algorithm used by D3’s circle-packing layout.<p><a href="https://observablehq.com/@d3/d3-packenclose" rel="nofollow">https://observablehq.com/@d3/d3-packenclose</a><p>I still haven’t quite figured out how to make D3’s implementation robust, though. Volodymyr Agafonkin’s robust-predicated would probably help…
<a href="https://github.com/mourner/robust-predicates">https://github.com/mourner/robust-predicates</a>
There is a very nice short proof of John's ellipsoid theorem by Gruber and Schuster:<p><a href="https://www.dmg.tuwien.ac.at/gruber/gruber_arbeiten/johnellipsoid.pdf" rel="nofollow">https://www.dmg.tuwien.ac.at/gruber/gruber_arbeiten/johnelli...</a><p>— one elegant trick I remember from there was that the value of a quadratic form with matrix A on vectors u and v (^T for transpose):<p>u^T A v<p>is interpreted as the dot product between the matrix A and the tensor product u v^T,<p>A • (u v^T)<p>— and dot product • on matrices is just from them being n×n vectors.<p>With that a lot of things are really nice now, e.g. interiors of ellipsoids correspond to intersections of halfspaces of matrices with the positive semidefinite cone. And halfspaces are simple to reason about and intersect!<p>This trick is also implicitly in the parent post, of course.
Well written piece, like that they walk through the problem formulation starting with the basics.<p>BTW is there a hackernews-type site or other aggregator that’s nothing but content like this? Maybe a subreddit? I’d love to read a few articles like this every day.
> So, our ellipse E is the set of all points y such that y = Ax where x is in the unit ball [and A is a transformation matrix].<p>So an ellipse is <i>only</i> something that exists following a transformation of a unit ball? So, these "unit balls" are the elemental atoms of this ellipsis physics? Technically speaking at least.
This is the premise behind some more recent self-supervised learning papers (see <a href="https://arxiv.org/abs/2303.03307" rel="nofollow">https://arxiv.org/abs/2303.03307</a>). Turns out, it's a solid analog for classification tasks.
Nice short piece, reduces the geometric problem to a semidefinite program which can be solved by generic optimisation codes without drowning the reader in detail.