Nodos

Región 11

Cierre

Triángulo 3

Voronoi

Delaunay

$Distancia\; taxi\;(L_1)$

$Distancia \;ajedrez\;(L_∞)$

$Distancia \;euclídea\;(L_2)$

Error del algoritmo

Contracción de círculos

eps2: 0.001
s = 50 (slider from 3 to 50, step 1)
B28 = (4.04, 2.11)
B27 = (7.59, 0.21)
B29 = (-4.08, 1.19)
B26 = (-2.1, -0.01)
B24 = (6.01, -0.71)
B23 = (2.74, -5.29)
B25 = (-6.64, -3.09)
B22 = (1.07, 4.01)
B20 = (0.69, 1.05)
B19 = (-3.01, -4.09)
B21 = (-8.95, 5.69)
B18 = (-10.52, 1.33)
B16 = (6.95, 1.89)
B15 = (8.98, -4.91)
B17 = (-5.07, 6.39)
B14 = (-9.31, -4.75)
B12 = (5.41, -1.81)
B11 = (-5.93, -0.71)
B13 = (2.01, 5.61)
B10 = (-5.57, 4.31)
B8 = (1.95, 3.33)
B7 = (0.01, -1.93)
B9 = (-10.09, 5.25)
B6 = (-7.19, 2.97)
B5 = (8.71, 4.79)
B3 = (4.29, -0.09)
B2 = (7.47, -3.65)
B4 = (-0.71, -5.37)
B1 = (-4.55, 2.27)
B30 = (-7.84, 0.43)
B31 = (6.94, -1.37)
B32 = (2.06, -0.37)
B33 = (8.5, 1.5)
B34 = (-0.61, 2.53)
B35 = (-4.76, 5.45)
B36 = (-4.19, -0.11)
B37 = (-10.22, -4.25)
B38 = (2.35, 0.81)
B39 = (0.86, -2.27)
B40 = (2.5, 4.85)
B41 = (-6.54, 2.51)
B42 = (-7.05, -1.21)
B43 = (-1.85, 3.41)
B44 = (10.22, -0.89)
B45 = (5.21, -4.71)
B46 = (6.46, 4.33)
B47 = (-8.32, -2.07)
B48 = (1.54, 1.93)
B49 = (-8.47, 4.39)
B50 = (-5.12, -5.67)
SitiosMax: {B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50}
Sitios = First(SitiosMax, s)
grafo1 = Voronoi(Sitios)
Nodos = Unique(First[grafo1, Length[grafo1]])
n = Length(Nodos)
distanciasNodos = Sequence({First[Sort[Sequence[Distance[Element[Nodos, j], Element[Sitios, k]], k, 1, s]], 3]}, j, 1, n)
Nodos1 = Sequence(If[Element[Element[Element[distanciasNodos, k], 1], 3] - Element[Element[Element[distanciasNodos, k], 1], 1] < eps2 ∧ Element[Element[Element[distanciasNodos, k], 1], 1] < 10^(7), Element[Nodos, k]], k, 1, n)
NodosReales = RemoveUndefined(Nodos1)
nR = Length(NodosReales)
radiosReales = Sequence(Min[Sequence[Distance[Element[NodosReales, k], Element[Sitios, j]], j, 1, s]], k, 1, nR)
reg = 11 (slider from 1 to s, step 1)
eps: 0.001
SitiosEnCadaNodoReal = Sequence(KeepIf[abs(Distance[Element[NodosReales, k], P] - Element[radiosReales, k]) < eps, P, Sitios], k, 1, nR)
NodosRealesEnRegiones = Sequence(RemoveUndefined[Sequence[If[Element[Sitios, k] ∈ Element[SitiosEnCadaNodoReal, j], Element[NodosReales, j]], j, 1, nR]], k, 1, s)
cierresFinitos = Sequence(ConvexHull[Element[NodosRealesEnRegiones, k]], k, 1, s)
regionesFinitas = Sequence(First[Element[cierresFinitos, k], Length[Element[cierresFinitos, k]]], k, 1, s)
región = Element(regionesFinitas, reg)
verNodos = false
radios = Sequence(Min[Sequence[Distance[Element[Nodos, k], Element[Sitios, j]], j, 1, s]], k, 1, n)
A1: 1
A2: 2
A3 = 3
A4 = 4
A5 = 5
A6 = 6
A7 = 7
A8 = 8
A9 = 9
A10 = 10
A11 = 11
A12 = 12
A13 = 13
A14 = 14
A15 = 15
A16 = 16
A17 = 17
A18 = 18
A19 = 19
A20 = 20
A21 = 21
A22 = 22
A23 = 23
A24 = 24
A25 = 25
A26 = 26
A27 = 27
A28 = 28
A29 = 29
A30 = 30
Puntos: {(-4.55, 2.27), (7.47, -3.65), (4.29, -0.09), (-0.71, -5.37), (8.71, 4.79), (-7.19, 2.97), (0.01, -1.93), (1.95, 3.33), (-10.09, 5.25), (-5.57, 4.31), (-5.93, -0.71), (5.41, -1.81), (2.01, 5.61), (-9.31, -4.75), (8.98, -4.91), (6.95, 1.89), (-5.07, 6.39), (-10.52, 1.33), (-3.01, -4.09), (0.69, 1.05), (-8.95, 5.69), (1.07, 4.01), (2.74, -5.29), (6.01, -0.71), (-6.64, -3.09), (-2.1, -0.01), (7.59, 0.21), (4.04, 2.11), (-4.08, 1.19), (-7.84, 0.43), (6.94, -1.37), (2.06, -0.37), (8.5, 1.5), (-0.61, 2.53), (-4.76, 5.45), (-4.19, -0.11), (-10.22, -4.25), (2.35, 0.81), (0.86, -2.27), (2.5, 4.85), (-6.54, 2.51), (-7.05, -1.21), (-1.85, 3.41), (10.22, -0.89), (5.21, -4.71), (6.46, 4.33), (-8.32, -2.07), (1.54, 1.93), (-8.47, 4.39), (-5.12, -5.67)}
a = false
A31 = 31
A32 = 32
A33 = 33
A34 = 34
A35 = 35
A36 = 36
A37 = 37
A38 = 38
A39 = 39
A40 = 40
A41 = 41
A42 = 42
A43 = 43
A44 = 44
A45 = 45
A46 = 46
A47 = 47
A48 = 48
A49 = 49
A50 = 50
grafo2 = DelauneyTriangulation(Sitios)
grafo3 = ConvexHull(Sitios)
Delaunay = First(grafo2, Length[grafo2])
cv = false
tri = 3 (slider from 1 to nR, step 1)
b = false
v = false
d = false
SitiosEnCadaNodo = Sequence(KeepIf[abs(Distance[Element[Nodos, k], P] - Element[radios, k]) < eps, P, Sitios], k, 1, n)
NodosEnRegiones = Sequence(RemoveUndefined[Sequence[If[Element[Sitios, k] ∈ Element[SitiosEnCadaNodo, j], Element[Nodos, j]], j, 1, n]], k, 1, s)
cierres = Sequence(ConvexHull[Element[NodosEnRegiones, k]], k, 1, s)
regiones = Sequence(First[Element[cierres, k], Length[Element[cierres, k]]], k, 1, s)
C1: {Polygon[regiones(A1)]}
aV = Sequence(Segment[Element[Element[regiones, reg], k], Element[Element[regiones, reg], k + 1]], k, 1, Length[Element[regiones, reg]] - 1)
aVF = Sequence(Segment[Element[región, k], Element[región, k + 1]], k, 1, Length[región] - 1)
triángulo: {Segment[Element[Element[SitiosEnCadaNodoReal, tri], 1], Element[Element[SitiosEnCadaNodoReal, tri], 2]], Segment[Element[Element[SitiosEnCadaNodoReal, tri], 2], Element[Element[SitiosEnCadaNodoReal, tri], 3]], Segment[Element[Element[SitiosEnCadaNodoReal, tri], 3], Element[Element[SitiosEnCadaNodoReal, tri], 1]]}
cierreSitios = First(grafo3, Length[grafo3])
tablaV = TableText(First[región, Length[región] - 1], aVF, "v")
texto1: "Nº sitios = " + s + ""
lados: Length[Delaunay] / 2
tablaD = TableText(First[Element[SitiosEnCadaNodoReal, tri], 3], triángulo, "v")
cab = false
texto2: "Nº \;nodos  \\ =Nº\; Δ = " + (LaTeX[nR]) + ""
texto3: "Nº \;aristas = " + (LaTeX[lados]) + ""
radio = 0 (slider from 0 to 10, step 0.01)
radio': 10 - radio
D1: {Polygon[B1 - (radio', 0), B1 - (0, radio'), 4]}
D2: {Polygon[B2 - (radio', 0), B2 - (0, radio'), 4]}
D3: {Polygon[B3 - (radio', 0), B3 - (0, radio'), 4]}
D4: {Polygon[B4 - (radio', 0), B4 - (0, radio'), 4]}
D5: {Polygon[B5 - (radio', 0), B5 - (0, radio'), 4]}
D6: {Polygon[B6 - (radio', 0), B6 - (0, radio'), 4]}
D7: {Polygon[B7 - (radio', 0), B7 - (0, radio'), 4]}
D8: {Polygon[B8 - (radio', 0), B8 - (0, radio'), 4]}
D9: {Polygon[B9 - (radio', 0), B9 - (0, radio'), 4]}
D10: {Polygon[B10 - (radio', 0), B10 - (0, radio'), 4]}
D11: {Polygon[B11 - (radio', 0), B11 - (0, radio'), 4]}
D12: {Polygon[B12 - (radio', 0), B12 - (0, radio'), 4]}
D13: {Polygon[B13 - (radio', 0), B13 - (0, radio'), 4]}
D14: {Polygon[B14 - (radio', 0), B14 - (0, radio'), 4]}
D15: {Polygon[B15 - (radio', 0), B15 - (0, radio'), 4]}
D16: {Polygon[B16 - (radio', 0), B16 - (0, radio'), 4]}
D17: {Polygon[B17 - (radio', 0), B17 - (0, radio'), 4]}
D18: {Polygon[B18 - (radio', 0), B18 - (0, radio'), 4]}
D19: {Polygon[B19 - (radio', 0), B19 - (0, radio'), 4]}
D20: {Polygon[B20 - (radio', 0), B20 - (0, radio'), 4]}
D21: {Polygon[B21 - (radio', 0), B21 - (0, radio'), 4]}
D22: {Polygon[B22 - (radio', 0), B22 - (0, radio'), 4]}
D23: {Polygon[B23 - (radio', 0), B23 - (0, radio'), 4]}
D24: {Polygon[B24 - (radio', 0), B24 - (0, radio'), 4]}
D25: {Polygon[B25 - (radio', 0), B25 - (0, radio'), 4]}
D26: {Polygon[B26 - (radio', 0), B26 - (0, radio'), 4]}
D27: {Polygon[B27 - (radio', 0), B27 - (0, radio'), 4]}
D28: {Polygon[B28 - (radio', 0), B28 - (0, radio'), 4]}
D29: {Polygon[B29 - (radio', 0), B29 - (0, radio'), 4]}
D30: {Polygon[B30 - (radio', 0), B30 - (0, radio'), 4]}
D31: {Polygon[B31 - (radio', 0), B31 - (0, radio'), 4]}
D32: {Polygon[B32 - (radio', 0), B32 - (0, radio'), 4]}
D33: {Polygon[B33 - (radio', 0), B33 - (0, radio'), 4]}
D34: {Polygon[B34 - (radio', 0), B34 - (0, radio'), 4]}
D35: {Polygon[B35 - (radio', 0), B35 - (0, radio'), 4]}
D36: {Polygon[B36 - (radio', 0), B36 - (0, radio'), 4]}
D37: {Polygon[B37 - (radio', 0), B37 - (0, radio'), 4]}
D38: {Polygon[B38 - (radio', 0), B38 - (0, radio'), 4]}
D39: {Polygon[B39 - (radio', 0), B39 - (0, radio'), 4]}
D40: {Polygon[B40 - (radio', 0), B40 - (0, radio'), 4]}
D41: {Polygon[B41 - (radio', 0), B41 - (0, radio'), 4]}
D42: {Polygon[B42 - (radio', 0), B42 - (0, radio'), 4]}
D43: {Polygon[B43 - (radio', 0), B43 - (0, radio'), 4]}
D44: {Polygon[B44 - (radio', 0), B44 - (0, radio'), 4]}
D45: {Polygon[B45 - (radio', 0), B45 - (0, radio'), 4]}
D46: {Polygon[B46 - (radio', 0), B46 - (0, radio'), 4]}
D47: {Polygon[B47 - (radio', 0), B47 - (0, radio'), 4]}
D48: {Polygon[B48 - (radio', 0), B48 - (0, radio'), 4]}
D49: {Polygon[B49 - (radio', 0), B49 - (0, radio'), 4]}
D50: {Polygon[B50 - (radio', 0), B50 - (0, radio'), 4]}
C2: {Polygon[regiones(A2)]}
C3: {Polygon[regiones(A3)]}
C4: {Polygon[regiones(A4)]}
C5: {Polygon[regiones(A5)]}
C6: {Polygon[regiones(A6)]}
C7: {Polygon[regiones(A7)]}
C8: {Polygon[regiones(A8)]}
C9: {Polygon[regiones(A9)]}
C10: {Polygon[regiones(A10)]}
C11: {Polygon[regiones(A11)]}
C12: {Polygon[regiones(A12)]}
C13: {Polygon[regiones(A13)]}
C14: {Polygon[regiones(A14)]}
C15: {Polygon[regiones(A15)]}
C16: {Polygon[regiones(A16)]}
C17: {Polygon[regiones(A17)]}
C18: {Polygon[regiones(A18)]}
C19: {Polygon[regiones(A19)]}
C20: {Polygon[regiones(A20)]}
C21: {Polygon[regiones(A21)]}
C22: {Polygon[regiones(A22)]}
C23: {Polygon[regiones(A23)]}
C24: {Polygon[regiones(A24)]}
C25: {Polygon[regiones(A25)]}
C26: {Polygon[regiones(A26)]}
C27: {Polygon[regiones(A27)]}
C28: {Polygon[regiones(A28)]}
C29: {Polygon[regiones(A29)]}
C30: {Polygon[regiones(A30)]}
C31: {Polygon[regiones(A31)]}
C32: {Polygon[regiones(A32)]}
C33: {Polygon[regiones(A33)]}
C34: {Polygon[regiones(A34)]}
C35: {Polygon[regiones(A35)]}
C36: {Polygon[regiones(A36)]}
C37: {Polygon[regiones(A37)]}
C38: {Polygon[regiones(A38)]}
C39: {Polygon[regiones(A39)]}
C40: {Polygon[regiones(A40)]}
C41: {Polygon[regiones(A41)]}
C42: {Polygon[regiones(A42)]}
C43: {Polygon[regiones(A43)]}
C44: {Polygon[regiones(A44)]}
C45: {Polygon[regiones(A45)]}
C46: {Polygon[regiones(A46)]}
C47: {Polygon[regiones(A47)]}
C48: {Polygon[regiones(A48)]}
C49: {Polygon[regiones(A49)]}
C50: {Polygon[regiones(A50)]}
che = false
E20: {Polygon[B20 - (radio', radio'), B20 + (radio', (-radio')), 4]}
E1: {Polygon[B1 - (radio', radio'), B1 + (radio', (-radio')), 4]}
E2: {Polygon[B2 - (radio', radio'), B2 + (radio', (-radio')), 4]}
E3: {Polygon[B3 - (radio', radio'), B3 + (radio', (-radio')), 4]}
E4: {Polygon[B4 - (radio', radio'), B4 + (radio', (-radio')), 4]}
E5: {Polygon[B5 - (radio', radio'), B5 + (radio', (-radio')), 4]}
E6: {Polygon[B6 - (radio', radio'), B6 + (radio', (-radio')), 4]}
E7: {Polygon[B7 - (radio', radio'), B7 + (radio', (-radio')), 4]}
E8: {Polygon[B8 - (radio', radio'), B8 + (radio', (-radio')), 4]}
E9: {Polygon[B9 - (radio', radio'), B9 + (radio', (-radio')), 4]}
E10: {Polygon[B10 - (radio', radio'), B10 + (radio', (-radio')), 4]}
E11: {Polygon[B11 - (radio', radio'), B11 + (radio', (-radio')), 4]}
E12: {Polygon[B12 - (radio', radio'), B12 + (radio', (-radio')), 4]}
E13: {Polygon[B13 - (radio', radio'), B13 + (radio', (-radio')), 4]}
E14: {Polygon[B14 - (radio', radio'), B14 + (radio', (-radio')), 4]}
E15: {Polygon[B15 - (radio', radio'), B15 + (radio', (-radio')), 4]}
E16: {Polygon[B16 - (radio', radio'), B16 + (radio', (-radio')), 4]}
E17: {Polygon[B17 - (radio', radio'), B17 + (radio', (-radio')), 4]}
E18: {Polygon[B18 - (radio', radio'), B18 + (radio', (-radio')), 4]}
E19: {Polygon[B19 - (radio', radio'), B19 + (radio', (-radio')), 4]}
E21: {Polygon[B21 - (radio', radio'), B21 + (radio', (-radio')), 4]}
E22: {Polygon[B22 - (radio', radio'), B22 + (radio', (-radio')), 4]}
E23: {Polygon[B23 - (radio', radio'), B23 + (radio', (-radio')), 4]}
E24: {Polygon[B24 - (radio', radio'), B24 + (radio', (-radio')), 4]}
E25: {Polygon[B25 - (radio', radio'), B25 + (radio', (-radio')), 4]}
E26: {Polygon[B26 - (radio', radio'), B26 + (radio', (-radio')), 4]}
E27: {Polygon[B27 - (radio', radio'), B27 + (radio', (-radio')), 4]}
E28: {Polygon[B28 - (radio', radio'), B28 + (radio', (-radio')), 4]}
E29: {Polygon[B29 - (radio', radio'), B29 + (radio', (-radio')), 4]}
E30: {Polygon[B30 - (radio', radio'), B30 + (radio', (-radio')), 4]}
E31: {Polygon[B31 - (radio', radio'), B31 + (radio', (-radio')), 4]}
E32: {Polygon[B32 - (radio', radio'), B32 + (radio', (-radio')), 4]}
E33: {Polygon[B33 - (radio', radio'), B33 + (radio', (-radio')), 4]}
E34: {Polygon[B34 - (radio', radio'), B34 + (radio', (-radio')), 4]}
E35: {Polygon[B35 - (radio', radio'), B35 + (radio', (-radio')), 4]}
E36: {Polygon[B36 - (radio', radio'), B36 + (radio', (-radio')), 4]}
E37: {Polygon[B37 - (radio', radio'), B37 + (radio', (-radio')), 4]}
E38: {Polygon[B38 - (radio', radio'), B38 + (radio', (-radio')), 4]}
E39: {Polygon[B39 - (radio', radio'), B39 + (radio', (-radio')), 4]}
E40: {Polygon[B40 - (radio', radio'), B40 + (radio', (-radio')), 4]}
E41: {Polygon[B41 - (radio', radio'), B41 + (radio', (-radio')), 4]}
E42: {Polygon[B42 - (radio', radio'), B42 + (radio', (-radio')), 4]}
E43: {Polygon[B43 - (radio', radio'), B43 + (radio', (-radio')), 4]}
E44: {Polygon[B44 - (radio', radio'), B44 + (radio', (-radio')), 4]}
E45: {Polygon[B45 - (radio', radio'), B45 + (radio', (-radio')), 4]}
E46: {Polygon[B46 - (radio', radio'), B46 + (radio', (-radio')), 4]}
E47: {Polygon[B47 - (radio', radio'), B47 + (radio', (-radio')), 4]}
E48: {Polygon[B48 - (radio', radio'), B48 + (radio', (-radio')), 4]}
E49: {Polygon[B49 - (radio', radio'), B49 + (radio', (-radio')), 4]}
E50: {Polygon[B50 - (radio', radio'), B50 + (radio', (-radio')), 4]}
euc = false
F1: {Circle[B1, radio']}
F2: {Circle[B2, radio']}
F3: {Circle[B3, radio']}
F4: {Circle[B4, radio']}
F5: {Circle[B5, radio']}
F6: {Circle[B6, radio']}
F7: {Circle[B7, radio']}
F8: {Circle[B8, radio']}
F9: {Circle[B9, radio']}
F10: {Circle[B10, radio']}
F11: {Circle[B11, radio']}
F12: {Circle[B12, radio']}
F13: {Circle[B13, radio']}
F14: {Circle[B14, radio']}
F15: {Circle[B15, radio']}
F16: {Circle[B16, radio']}
F17: {Circle[B17, radio']}
F18: {Circle[B18, radio']}
F19: {Circle[B19, radio']}
F20: {Circle[B20, radio']}
F21: {Circle[B21, radio']}
F22: {Circle[B22, radio']}
F23: {Circle[B23, radio']}
F24: {Circle[B24, radio']}
F25: {Circle[B25, radio']}
F26: {Circle[B26, radio']}
F27: {Circle[B27, radio']}
F28: {Circle[B28, radio']}
F29: {Circle[B29, radio']}
F30: {Circle[B30, radio']}
F31: {Circle[B31, radio']}
F32: {Circle[B32, radio']}
F33: {Circle[B33, radio']}
F34: {Circle[B34, radio']}
F35: {Circle[B35, radio']}
F36: {Circle[B36, radio']}
F37: {Circle[B37, radio']}
F38: {Circle[B38, radio']}
F39: {Circle[B39, radio']}
F40: {Circle[B40, radio']}
F41: {Circle[B41, radio']}
F42: {Circle[B42, radio']}
F43: {Circle[B43, radio']}
F44: {Circle[B44, radio']}
F45: {Circle[B45, radio']}
F46: {Circle[B46, radio']}
F47: {Circle[B47, radio']}
F48: {Circle[B48, radio']}
F49: {Circle[B49, radio']}
F50: {Circle[B50, radio']}
intro = true
vel: 1
A: (-8, 0)
B: (2, 0)
C = (4.5, 4.5)
grafo4 = Voronoi({A, B, C})
f = LineBisector(A, B)
contraer = false
cirA: {Circle[A, radio']}
cirB: {Circle[B, radio']}
cirC: {Circle[C, radio']}