Computes the "geometric median"
(or Fermat-Weber point) of a set of given points in the plane.
The data, for each point i = 1..n, are
xi, yi, and weight
wi (1 if unweighted).
The method is Weiszfeld or Python (NM) minimize.
Files involved:
P.fw.php (this one),
Ferweb.php,
ferweb.py.
Draws the given points and their centroid and FW point.
Computation structure — A PHP file
(this page: 'P.fw.php') calls (via
'action=...') an intermediate PHP file ('./Ferweb.php'), which
(through $_POST) sends the problem data as command line arguments to
a Python script. This last does the computing, and makes
'system' call(s) to 'gnuplot', for the final (temporary) web page.
Keywords: Geometric median;
Fermat-Weber point; minimization; PHP; Python; gnuplot.
(*) If your browser does not download, try
Weight.xlsx.txt,
Ones.xlsx.txt
and rename back. |