DEQ
"Centroids" of 2D points
Computes the centroid and geometic median of random 2D points
2025.Sep.20 20:54:59
Points Number of points in region.
Criterion   Minimum cost or distance for exploration.
Width, height Regin width and height.
Power     Power to raise distance to.
Trials (N), seed     Monte Carlo trials, seed.
Method           Method of multivariable minimization.
Sim. y-, x-axis bounds Simulation: axes bound in plot.
Plot points Simulation: n. of plot points.
Show values Show graph coordinates.

Computes: the centroid (simple average); and the geometric median, by minimum total distance. In Fig. 1, with 10 random points, the two symbols show the two solutions, in a rectangular region.

Minimization methods: (1) NM=Nelder-Mead, (2) Pow=Powell, (3) CG, (4) BFGS, (5) LB=L-BFGS-B, (6) TNC, (7) CL=COBYLA, (8) CQ=COBYQA, (9) SL=SLSQP.

Using numerical minimization (instead of the classical Weiszfeld algorithm) permits to determine the minimum sum of distances raised to several given powers.

Shows the graphical results: (a) region with random points, and centroid as larger circle and g. median as smaller circle; and (b) random behavior of simulated variable.

ODEs Fig. 1
References: Plate: Centroids

• Optimization (scipy.optimize), The SciPy community. • 'minimize' (methods)

• Vászonyi, Andrew (Weiszfeld)

• CISTI'2026, 17–19 June (to be confirmed) 2026, Santiago de Compostela (Spain).

• 1805-08-04: Hamilton, William Rowan (†1865-09-02, 60 yrs.).

 
 
Valid HTML 5! IST http://lisweb.vps.tecnico.ulisboa.pt/lab/centroid/P.centroid.php
Created: 2025-08-04 — Last modified: 2025-09-06