fix: Add three missing edges

This commit is contained in:
Glen Whitney 2025-09-22 08:38:29 -07:00
parent 02cf7580bc
commit 3afdd3a36b
3 changed files with 149 additions and 146 deletions

View file

@ -30,15 +30,15 @@ acron_data = [
("B_NE", [ HPHI, HPHI, RTHPHI], P, 2, "Z_E"),
("B_NW", [-HPHI, HPHI, RTHPHI], P, 2, ""),
("B_SW", [-HPHI, -HPHI, RTHPHI], P, 2, "Z_S"),
("B_SE", [ 0.812, -0.812, 0.89], F, 2, "Z_E,Z_S"),
("B_SE", [ 0.812, -0.812, 0.89], F, 2, "A_SE,Z_E,Z_S"),
("Y_NE", [ 0.11, 0.103, 1.019], F, 3, "B_NE"),
("Y_NW", [-0.103, 0.103, 1.02], F, 3, "B_NW"),
("Y_SE", [ 0.11, -0.11, 1.017], F, 3, "B_SE"),
("Y_SW", [-0.103, -0.11, 1.019], F, 3, "B_SW"),
("C_N", [ 0., 1., RTPHIPH], P, 4, "Y_NE,Y_NW"),
("C_W", [-1., 0., RTPHIPH], P, 4, "Y_NW,Y_SW"),
("C_E", [ 1.006, -0.006, 1.45], F, 4, "Y_NE,Y_SE"),
("C_S", [ 0.006, -1.006, 1.45], F, 4, "Y_SE,Y_SW"),
("C_E", [ 1.006, -0.006, 1.45], F, 4, "B_NE,B_SE,Y_NE,Y_SE"),
("C_S", [ 0.006, -1.006, 1.45], F, 4, "B_SE,B_SW,Y_SE,Y_SW"),
("D_NE", [ 0.2, 0.181, 2.011], F, 5, "Y_NE,C_N,C_E"),
("D_NW", [-0.181, 0.181, 2.014], F, 5, "Y_NW,C_N,C_W"),
("D_SE", [ 0.2, -0.2, 2.009], F, 5, "Y_SE,C_E,C_S"),
@ -63,6 +63,7 @@ acron_data = [
]
E = 0.0
n_struts = 11 # for the pinned vertices, which all have length exactly 1
for vi in range(0, len(acron_data)):
start_id = acron_data[vi][0]
start = vertices[start_id]
@ -79,4 +80,6 @@ for vi in range(0, len(acron_data)):
(end[0]-start[0])**2 + (end[1]-start[1])**2 + (end[2]-start[2])**2)
print(f"{start_id}-{end_id}: {dist} {dist-1}")
E += fabs(dist-1)
n_struts += 1
print(n_struts, "unit edges")
print(f"----> Total distortion E={E}")