Locating Geometric Medians/Centers on a Circle from Discrete Sample Points Depen
Loading the math board and drawing, please wait…
This GeoGebra example demonstrates how the location of the geometric median (or geometric center) on a circle changes as a movable test point varies, given a set of discrete sample points fixed on the circle. The core mathematical concepts include the geometric median (minimizing the sum of distances to sample points), circle parametrization, vector operations, and optimization. The construction uses commands such as Circle, Point, Sequence, Sum, Vector, Length, Slider, InputBox, If, Sort, Element, and Text to generate sample points, compute distance sums, and dynamically highlight the optimal point on the circle. It is suitable for high school or undergraduate students studying coordinate geometry, vectors, and optimization, and serves as an intuitive tool for exploring robust statistics and center location problems.
GeoGebra Commands & Parameters
Sum(Zip[sqrt(((R * cos(x)) - x(b))^(2) + ((R * sin(x)) - y(b))^(2)), b, lP]) → f0Circle(O, R) → gPoint(g) → p0Zip(Vector[UnitVector[a - p0]], a, lP) → l1Sum(Zip[Length[a - p0], a, lP]) → sumSum(Zip[Length[a - p0]^(2), a, lP]) → sum_qSum(Zip[Length[a - min_q0]^(2), a, lP]) → sum1_qSum(Zip[Length[a - max_q0]^(2), a, lP]) → sum2_qSegment(max_q0, min_q0) → hTextfield(na) → InputBox1Sequence((R; ((2 * π / na) * j)), j, 0, na) → ltest_2Zip((R; a), a, x(Extr_g)) → lZZsad'Vector(p0, p0 + UnitVector[Sum[l1]]) → l11Vector(p0, p0 + UnitVector[p0]) → l12Angle(l11, l12) → αZip(Vector[b, b + UnitVector[Sum[Zip[UnitVector[a - b], a, lP]]]], b, lZmax') → Wi_PmaxZip(Vector[b, b + UnitVector[Sum[Zip[UnitVector[a - b], a, lP]]]], b, lZmin') → Wi_PminZip(Vector[x0, x0 + UnitVector[x0]], x0, lZmax') → Wi_Pmax'Zip(Vector[x0, x0 + UnitVector[x0]], x0, lZmin') → Wi_Pmin'Zip(Angle[a, Vector[b]], Vector[a], Wi_Pmax, Vector[b], Wi_Pmax') → Wii_pmaxZip(Angle[a, Vector[b]], Vector[a], Wi_Pmin, Vector[b], Wi_Pmin') → Wii_pminZip(Segment[p0, a], a, lP) → l0Zip((a, f1(a)), a, x(lExtr')) → lExtrf'Length(lExtrf') → läSum(Zip[((R * cos(x)) - x(b))^(2) + ((R * sin(x)) - y(b))^(2), b, lP]) → f0_qZip((a, f1(a)), a, Zip[Angle[a], a, lZmin']) → lmin1Zip((a, f1(a)), a, Zip[Angle[a], a, lZmax']) → lmax1Zip((a, f1(a)), a, Zip[Angle[a], a, lZZsad']) → lsadVector(C, C + (0, 0.5)) → uVector(C_q, C_q + (0, 0.5)) → u_qTextfield(s) → InputBox2Textfield(s_q) → InputBox3TableText(Append["k", 1…Length[Wii_pmin]], Append["Δφ_k, grad", Wii_pmin], "v") → text23minTableText(Append["k", 1…Length[Wii_pmax]], Append["Δφ_k, grad", Wii_pmax], "v") → text23maxText("f(x)", (-0.1, f1(0) + 0.2)) → text6Text("f_q(x)", (-0.1, f1_q(0) + 0.2)) → text6bElement(lmax1, IndexOf[Max[y(lmax1)], y(lmax1)]) → D1Element(lmin1, IndexOf[Min[y(lmin1)], y(lmin1)]) → D2Zip(Point[a, 1], Vector[a], Wi_Pmax) → PmaxZip(Point[a, 1], Vector[a], Wi_Pmin) → PminZip(Point[a, 1], Vector[a], Wi_Pmax') → Pmax'Zip(Point[a, 1], Vector[a], Wi_Pmin') → Pmin'Point(l11, 1) → Tpoint1Point(l12, 1) → Tpoint2Zip(Text["c_" + (a) + "", b], a, 1…Length[lZmin'], b, lZmin' + (0.2, 0.2)) → txtminElement(lZmin', IndexOf[Min[y(lmin1)], y(lmin1)]) → AGlobalminElement(lZmax', IndexOf[Max[y(lmax1)], y(lmax1)]) → AGlobalmaxRotateText(txt, 90°) → txt1Sort(Flatten[x(lExtr')]) → xlExtr'Zip((abs(a - b) / a * 100), a, xlExtr', b, xlMaxmin) → ΔZip(ScientificText[a, 3], a, Δ) → Δ1TableText(Append["k", 1…lä], Append["δ=\frac{x_{Extr}-x_{iter}}{x_{Extr}}*100% ", Δ1], "v") → text23ΔIf(p0 ≟ min_q0 ∨ p0 ≟ max_q0, true, false) → bue1Zip(Text["c_" + (a) + "", b], a, 1…Length[lZmax'], b, lZmax' + (-0.2, 0.2)) → txtmaxZip(Text["\vec{c}_ " + (a) + "", b, true, true], a, 1…Length[lZmax'], b, Pmax' + (-0.35, 0.35)) → txtPmax'Zip(Text["\vec{c}_ " + (a) + "", b, true, true], a, 1…Length[lZmax'], b, Pmin' + (-0.35, 0.35)) → txtPmin'Zip(Text["\overrightarrow{f}_" + (a) + "", b, true, true], a, 1…Length[lZmax'], b, Pmax + (-0.4, 0.2)) → txtPmaxZip(Text["\overrightarrow{f}_" + (a) + "", b, true, true], a, 1…Length[lZmax'], b, Pmin + (-0.4, 0.1)) → txtPminUnitVector(Vector[p0, p0 - A]) → wAngle(w, l12) → βZip(Vector[x0, x0 + UnitVector[Vector[x0, x0 - (Length[lP] * x0) - Sum[lP]]]], x0, lZ_q) → wq_iZip(Vector[x0, x0 + UnitVector[x0]], x0, lZ_q) → wcq_iIf(b, "sum of distances", "sum of the squares of distances") → txtsumPoint(w, 1) → Tpoint2_qIf(a, "\fgcolor{#007FFF}{f(x)}", "\fgcolor{magenta}{f_q(x)}") → text22a
AI Drawing Prompt Reference
Draw a circle with several fixed sample points on it)Skip. Place a movable test point on the circle. Connect the test point to each sample point with a segment. Compute the sum of lengths of these segments, which varies as the test point moves. Mark the two special points on the circle where this sum is minimized and maximized, and connect them with a segment. At the test point, draw an arrow representing the sum of unit vectors pointing from the test point to each sample point, and another arrow pointing from the test point toward the circle's center. Show the angle between these two arrows. Additionally, plot a curve outside the circle showing how the total distance sum changes with the angle of the test point, and highlight the global minimum and maximum points on that curve.
The prompt above was compiled from the original drawing commands and is for reference only.