
Fermat Point - winkerVSbecks
http://winkervsbecks.github.io/fermat-point
======
Sharlin
If people have to write Chrome-only code, could they at least put a disclaimer
somewhere?

~~~
winkerVSbecks
My intention wasn't to make something Chrome specific but, I did mess up by
not testing in other browsers. Sorry about that.

Turns out that you can't set circle radius in CSS in both Safari and Firefox.
For some reason Chrome supports it. Not sure what the correct spec is. In any
case it's fixed now.

~~~
Sharlin
I could have formulated my criticism more constructively, sorry about that.
Just a pet peeve I guess. Thanks for fixing the issue!

------
amelius
How does this extend to higher dimensions?

~~~
gjm11
Quick answer: "Triangle" becomes "tetrahedron" in 3 dimensions, and "simplex"
in any number of dimensions. There is a notion of "solid angle" that works in
any number of dimensions. Then the sum of distances to the vertices of a
simplex is minimized (1) by a point inside it from which the solid angles
subtended by the faces of the simplex are equal, or (2) at one vertex of the
simplex; case 2 holds if the angle subtended at some vertex is >= 1/(n+1) of
the "total solid angle" in that many dimensions, otherwise case 1 does.

I suppose I should explain what all that means.

 _Simplices_

A simplex in n-dimensional space consists of n+1 points in general position,
together with every convex combination of those points.

"In general position" means they don't all lie in a single hyperplane.

A "hyperplane" means all the points satisfying some linear relationship
(strictly, _affine_ rather than _linear_ ) between their coordinates. E.g.,
ax+by+c=0 in two dimensions.

A "convex combination" of x1,...,xk means all points of the form a1.x1 + ... +
ak.xk where a1,...,ak are non-negative numbers whose sum is 1. E.g., the
convex combinations of two points are exactly the points on the line segment
joining those two points.

 _Solid angles_

Suppose you have a point P in n-dimensional space, and some other convex
region R in the space. Consider all the rays from P that pass through R; they
form a "convex cone" based at that point.

A "convex region" is one such that, if a bunch of points belong to it, so do
all convex combinations of those points.

Now, take a (hyper)sphere of radius 1 centred at P and look at the points
where those rays meet its surface. The (hyper)area of the set of such points
is the solid angle subtended at P by R.

The solid angle subtended at any point by the whole of space equals the
(hyper)area of the unit sphere in that space. There is a formula for this but
it doesn't matter right now. (When n=2 the "unit hypersphere" is actually a
unit circle and "hyperarea" actually means "length"; the figure is 2pi, so we
are working in radians. When n=3 it's a unit sphere, "hyperarea" means area,
and it's 4pi, so the maximum solid angle you can have is 4pi.)

~~~
winkerVSbecks
That's an awesome explanation! I wasn't even aware of "simplex". Guess I'm
going to have to add it to my list of things to obsess about.

