Sphere: generate two uniformly scattered points from one uniform source (Icosahe

Sphere: generate two uniformly scattered points from one uniform source (Icosahe
Loading the math board and drawing, please wait…
2021-01-09 22:32
This example demonstrates how to obtain two different points on a sphere that are as uniformly separated as possible by using a single underlying uniform random distribution, using an icosahedron-based reference with V=12. Visually, it focuses on producing two points whose mutual spacing on the spherical surface is maximized according to a chosen score. Key math ideas include spherical geometry (Sphere/Surface), vector/coordinate representation, mapping parameters to the sphere, measuring angular/Euclidean separation (Angle, Length), and selecting the best pair via evaluation functions and extremum logic (If, Min/Max). In construction, candidate points are generated and represented as vectors on/relative to a Sphere, then their relationship is computed using Angle and distance. A scoring function (built with Function and optionally aggregation like Sum) is evaluated and filtered: If constraints are met, the pair that optimizes the objective is selected (via Min/Max with tolerance parameters). The GeoGebra setup leverages commands/objects such as Sphere, Circle, Vector, Angle, Length, Function, If, Max, Min, Polygon/PolyLine for geometry display, and TableText/Textfield for reporting intermediate results, along with text/annotation utilities (e.g., RotateText). Suitable for high school to early university instruction in geometry, computational visualization, and introductory probabilistic sampling concepts.

GeoGebra Commands & Parameters

  1. Polygon({((-π), ((-π)) / 2), ((-π), π / 2), (π, π / 2), (π, ((-π)) / 2)}) → q_2
  2. PointIn(q_2) → Atest_2
  3. Function(f01, (-π), π, ((-π)) / 2, π / 2) → f0
  4. Zip((x(a), y(a), f0(a)), a, Zmin_2) → fmin3D
  5. Zip((x(a), y(a), f0(a)), a, Zmax_2) → fmax3D
  6. Vector((1.3 * Z3), (1.5 * Z3)) → AVZ3r
  7. Vector((1.3 * Z3), (1.3 * Z3) + UnitVector[Sum[Zip[UnitVector[a - Z3], a, lP]]]) → AVZ3
  8. Vector((1.3 * Z2), (1.5 * Z2)) → AVZ2r
  9. Vector((1.3 * Z2), (1.3 * Z2) + UnitVector[Sum[Zip[UnitVector[a - Z2], a, lP]]]) → AVZ2
  10. Vector((1.3 * Z1), (1.5 * Z1)) → AVZ1r
  11. Vector((1.3 * Z1), (1.3 * Z1) + UnitVector[Sum[Zip[UnitVector[a - Z1], a, lP]]]) → AVZ1
  12. Vector((1.3 * Atest_R), (1.3 * Atest_R) + UnitVector[Sum[Zip[UnitVector[a - Atest_R], a, lP]]]) → AVtest
  13. Vector((1.3 * Atest_R), (1.5 * Atest_R)) → AVtestr
  14. Sphere(O, R) → sphera
  15. Circle(O, R, xOyPlane) → c
  16. PointIn(q_2) → RZ1_2
  17. PointIn(q_2) → RZ2_2
  18. Angle(AVtest, AVtestr) → αA
  19. Angle(AVZ1, AVZ1r) → αZ1
  20. Angle(AVZ2, AVZ2r) → αZ2
  21. Zip(Segment[Atest_R, p], p, lP) → seg
  22. Sum(seg) → sum_seg
  23. PolyLine({((-π), ((-π)) / 2), ((-π), π / 2), (π, π / 2), (π, ((-π)) / 2), ((-π), ((-π)) / 2)}) → q1
  24. Flatten(Sequence[Sequence[((-π) + ((2 * π / na) * i), ((-π)) / 2 + (π / na * j)), j, 1, na], i, 1, na]) → ltest_2
  25. Zip((R; x(a); y(a)), a, ltest_2) → ltest_3
  26. Length(lZmax') → lälZmax'
  27. Textfield(n) → InputBox11
  28. alfa(R, lP, lZsad') → αsad
  29. If(αZ1 > 100°, 180° - αZ1, αZ1) → αZ1'
  30. Textfield(m_1) → InputBox12
  31. Textfield(t) → InputBox13
  32. Textfield(m_2) → InputBox14
  33. PointIn(q_2) → RZ3_2
  34. Sum(Zip[1 / Length[p - Z3], p, lP]) → ZahZ3
  35. Angle(AVZ3, AVZ3r) → αZ3
  36. Textfield(R) → InputBox1
  37. Textfield(na) → InputBox2
  38. Max(f(Zmax_2)) → max_f
  39. Min(f(Zmin_2)) → min_f
  40. Zip(Text["d_{" + (a) + "}", (Atest_R + Element[lP, a]) / 2], a, 1…n) → lPtxt
  41. Zip(Segment[F_o, p], p, lP) → seg0
  42. Sum(seg0) → sum_seg0
  43. RotateText(txt, 90°) → txt1
  44. Sum(lZ3sad) → sumlZ3sad
  45. Textfield(Points3D) → InputBox7
  46. Textfield(lZsad') → InputBox17
  47. Textfield(lZmin') → InputBox16
  48. Textfield(lZmax') → InputBox15
  49. Textfield(jmin) → InputBox18
  50. Textfield(jmax) → InputBox19
  51. Textfield(jsad) → InputBox20
  52. Zip(Text["" + (b), a - (0.1, 0.1)], a, Zmax_2, b, 1…Length[Zmax_2]) → l2maxtxt
  53. Zip(Text["" + (b), a - (0.1, 0.1)], a, Zmin_2, b, 1…Length[Zmin_2]) → l2mintxt
  54. Zip(Text["" + (b), a - (0.1, 0.1)], a, Zsad_2, b, 1…Length[Zsad_2]) → l2sadtxt
  55. Zip(Vector[r1, (1.153846154 * r1)], r1, (1.3 * Zip[(R * UnitVector[a]), a, lZmax'])) → lVmaxr
  56. Zip(Vector[r1, (1.153846154 * r1)], r1, (1.3 * Zip[(R * UnitVector[a]), a, lZmin'])) → lVminr
  57. Zip(Vector[r1, (1.153846154 * r1)], r1, (1.3 * Zip[(R * UnitVector[a]), a, lZsad'])) → lVsadr
  58. alfa(R, lP, lZmax') → αmax
  59. alfa(R, lP, lZmin') → αmin
  60. arrow(R, lP, lZmax') → lVmax
  61. arrow(R, lP, lZmin') → lVmin
  62. arrow(R, lP, lZsad') → lVsad
  63. CurveCartesian((-π) + ((2 * π) * a), ((-π)) / 2, f0((-π) + ((2 * π) * a), ((-π)) / 2), a, 0, 1) → par1
  64. CurveCartesian((-π) + ((2 * π) * a), π / 2, f0((-π) + ((2 * π) * a), π / 2), a, 0, 1) → par2
  65. CurveCartesian((-π), ((-π)) / 2 + (π * a), f0((-π), ((-π)) / 2 + (π * a)), a, 0, 1) → par3
  66. CurveCartesian(π, ((-π)) / 2 + (π * a), f0(π, ((-π)) / 2 + (π * a)), a, 0, 1) → par4
  67. Polygon({((-π), ((-π)) / 2), ((-π), π / 2), (π, π / 2), (π, ((-π)) / 2)}) → q_3
  68. Zip((x(a), y(a), f0(a)), a, Zsad_2) → fsad3D
  69. Textfield(achs) → InputBox3
  70. Zip(Atest_2 + (r_c; ((2 * π / n_c) * k)), k, 0…(n_c - 1)) → l0r
  71. Sum(Unique[sgn(f(Atest_2) - f(l0r))]) → sum_r
  72. Sum(Sequence[If[sum00_r(i) ≠ sum00_r(i + 1), 1, 0], i, 1, Length[sum00_r] - 1]) → sum01_r
  73. Circle(Atest_2, 0.2) → ci
  74. TableText(Append["i", Sequence[Length[lZsad']]], Append["\frac{N°}{levels} ", msad], Append["P_{sad }", lZsad'], Append["(f'x,f'y)", lZf'xysad], Append[" Δα≟ π ", αsad], "v") → text2c
  75. TableText(Append["i", Sequence[Length[αmax]]], Append["\frac{N°}{levels} ", mmax], Append["P_{Max }", lZmax'], Append["(f'x,f'y)", lZf'xymax], Append[" Δα≟ π ", αmax], "v") → text2a
  76. TableText(Append["i", Sequence[Length[αmin]]], Append["\frac{N°}{levels} ", mmin], Append["P_{Min }", lZmin'], Append["(f'x,f'y)", lZf'xymin], Append[" Δα≟ π ", αmin], "v") → text2b

AI Drawing Prompt Reference

Create a 3D sphere with a defined center and radius. Generate a set of candidate points on its surface by parameterizing a reference region and mapping those parameters onto the sphere; represent each candidate by its position vector from the center. Sample additional candidates using the same underlying uniform source idea, then choose a pair of points whose mutual separation on the spherical surface is as large as possible according to an evaluation based on angular separation (via the angle between their center-to-point vectors) and distance/length-derived measures. Display the two selected points through their direction vectors, show the corresponding angle measurement with text, and include auxiliary polylines or line segments that visualize the reference region and the selected directions.
The prompt above was compiled from the original drawing commands and is for reference only.