2 points

3 points

4 points

5 points

6 points

7 points

8 points

Thanks to vectors, we can simulate forces, whether attractive or repulsive, that force 
a point to tend to occupy a relatively stable position. At each instant, the position of each 
point is recalculated, adding to the current one the vector resulting from the repulsive forces.

r: 4
n = 23.6000000000002
num = 2
cir = Circle((0, 0), r)
A7 = PointIn(cir)
A6 = PointIn(cir)
A5 = PointIn(cir)
A4 = PointIn(cir)
A3 = PointIn(cir)
A1 = PointIn(cir)
A2 = PointIn(cir)
A8 = PointIn(cir)
a12: Vector[A2, A1] / (abs(Vector[A2, A1]))^(2)
a13: Vector[A3, A1] / (abs(Vector[A3, A1]))^(2)
a14: Vector[A4, A1] / (abs(Vector[A4, A1]))^(2)
a15: Vector[A5, A1] / (abs(Vector[A5, A1]))^(2)
a16: Vector[A6, A1] / (abs(Vector[A6, A1]))^(2)
a17: Vector[A7, A1] / (abs(Vector[A7, A1]))^(2)
a18: Vector[A8, A1] / (abs(Vector[A8, A1]))^(2)
a23: Vector[A3, A2] / (abs(Vector[A3, A2]))^(2)
a24: Vector[A4, A2] / (abs(Vector[A4, A2]))^(2)
a25: Vector[A5, A2] / (abs(Vector[A5, A2]))^(2)
a26: Vector[A6, A2] / (abs(Vector[A6, A2]))^(2)
a27: Vector[A7, A2] / (abs(Vector[A7, A2]))^(2)
a28: Vector[A8, A2] / (abs(Vector[A8, A2]))^(2)
a34: Vector[A4, A3] / (abs(Vector[A4, A3]))^(2)
a35: Vector[A5, A3] / (abs(Vector[A5, A3]))^(2)
a36: Vector[A6, A3] / (abs(Vector[A6, A3]))^(2)
a37: Vector[A7, A3] / (abs(Vector[A7, A3]))^(2)
a38: Vector[A8, A3] / (abs(Vector[A8, A3]))^(2)
a45: Vector[A5, A4] / (abs(Vector[A5, A4]))^(2)
a46: Vector[A6, A4] / (abs(Vector[A6, A4]))^(2)
a47: Vector[A7, A4] / (abs(Vector[A7, A4]))^(2)
a48: Vector[A8, A4] / (abs(Vector[A8, A4]))^(2)
a56: Vector[A6, A5] / (abs(Vector[A6, A5]))^(2)
a57: Vector[A7, A5] / (abs(Vector[A7, A5]))^(2)
a58: Vector[A8, A5] / (abs(Vector[A8, A5]))^(2)
a67: Vector[A7, A6] / (abs(Vector[A7, A6]))^(2)
a68: Vector[A8, A6] / (abs(Vector[A8, A6]))^(2)
k = Max((2 * r / n), 0.01)
a78: Vector[A8, A7] / (abs(Vector[A8, A7]))^(2)
anima = 0.716 (slider from 0 to 1)
op2 = true
op3 = false
op4 = false
op5 = false
op6 = false
op7 = false
op8 = false
a8: (k * UnitVector[(-a18) - a28 - a38 - a48 - a58 - a68 - a78])
verEsfera = true
puntos = First({A1, A2, A3, A4, A5, A6, A7, A8}, num)
visibles = 1
s12 = Segment(A1, A2)
s13 = Segment(A1, A3)
s14 = Segment(A1, A4)
s15 = Segment(A1, A5)
s16 = Segment(A1, A6)
s17 = Segment(A1, A7)
s18 = Segment(A1, A8)
s23 = Segment(A2, A3)
s24 = Segment(A2, A4)
s25 = Segment(A2, A5)
s26 = Segment(A2, A6)
s27 = Segment(A2, A7)
s28 = Segment(A2, A8)
s34 = Segment(A3, A4)
s35 = Segment(A3, A5)
s36 = Segment(A3, A6)
s37 = Segment(A3, A7)
s38 = Segment(A3, A8)
s45 = Segment(A4, A5)
s46 = Segment(A4, A6)
s47 = Segment(A4, A7)
s48 = Segment(A4, A8)
s56 = Segment(A5, A6)
s57 = Segment(A5, A7)
s58 = Segment(A5, A8)
s67 = Segment(A6, A7)
s68 = Segment(A6, A8)
s78 = Segment(A7, A8)
dis = Sort(Flatten[Sequence[Sequence[abs(puntos(k) - puntos(s)), s, k + 1, num], k, 1, num - 1]])
disV = First(dis, visibles)
cota: Element[Last[disV, 1], 1] + 0.05
s120 = Segment(A1, A2)
s130 = Segment(A1, A3)
s140 = Segment(A1, A4)
s150 = Segment(A1, A5)
s160 = Segment(A1, A6)
s170 = Segment(A1, A7)
s180 = Segment(A1, A8)
s230 = Segment(A2, A3)
s240 = Segment(A2, A4)
s250 = Segment(A2, A5)
s260 = Segment(A2, A6)
s270 = Segment(A2, A7)
s280 = Segment(A2, A8)
s340 = Segment(A3, A4)
s350 = Segment(A3, A5)
s360 = Segment(A3, A6)
s370 = Segment(A3, A7)
s380 = Segment(A3, A8)
s450 = Segment(A4, A5)
s460 = Segment(A4, A6)
s470 = Segment(A4, A7)
s480 = Segment(A4, A8)
s560 = Segment(A5, A6)
s570 = Segment(A5, A7)
s580 = Segment(A5, A8)
s670 = Segment(A6, A7)
s680 = Segment(A6, A8)
s780 = Segment(A7, A8)
énfasis = 1
disE = First(dis, énfasis)
cota2: Element[Last[disE, 1], 1] + 0.05
c12: (2 * UnitVector[Vector[A1, A2]])
c13: (2 * UnitVector[Vector[A1, A3]])
c21: (2 * UnitVector[Vector[A2, A1]])
c23: (2 * UnitVector[Vector[A2, A3]])
c31: (2 * UnitVector[Vector[A3, A1]])
c32: (2 * UnitVector[Vector[A3, A2]])
a3: (k * UnitVector[(-a13) - a23 + a34 + a35 + a36 + a37 + a38])
a4: (k * UnitVector[(-a14) - a24 - a34 + a45 + a46 + a47 + a48])
a5: (k * UnitVector[(-a15) - a25 - a35 - a45 + a56 + a57 + a58])
a6: (k * UnitVector[(-a16) - a26 - a36 - a46 - a56 + a67 + a68])
a7: (k * UnitVector[(-a17) - a27 - a37 - a47 - a57 - a67 + a78])
a1: (k * UnitVector[a12])
a2: (k * UnitVector[(-a12)])