chore: record 554aug2 data in git

This commit is contained in:
Glen Whitney 2025-09-22 07:47:48 -07:00
parent d572231a71
commit 02cf7580bc
2 changed files with 460 additions and 0 deletions

378
data554/pinnedAug2.txt Normal file
View file

@ -0,0 +1,378 @@
A_NE:
┌ ┐
│ 0.5 │
│ 0.5 │
│ 0 │
│ 0.5 │
│ 0.25 │
└ ┘
A_NW:
┌ ┐
│ -0.5 │
│ 0.5 │
│ 0 │
│ 0.5 │
│ 0.25 │
└ ┘
A_SE:
┌ ┐
│ 0.5 │
│ -0.5 │
│ 0 │
│ 0.5 │
│ 0.25 │
└ ┘
A_SW:
┌ ┐
│ -0.5 │
│ -0.5 │
│ 0 │
│ 0.5 │
│ 0.25 │
└ ┘
Z_E:
┌ ┐
│ 0.22640100987140263 │
│ -0.0000000000000011264771679683783 │
│ 0.8216712192845821 │
│ 0.5 │
│ 0.36320050493570133 │
└ ┘
Z_S:
┌ ┐
│ 0.0000000000000011207778651773038 │
│ -0.22640100987140266 │
│ 0.8216712192845821 │
│ 0.5 │
│ 0.3632005049357014 │
└ ┘
B_NE:
┌ ┐
│ 0.8090169943749475 │
│ 0.8090169943749475 │
│ 0.8994537199739336 │
│ 0.5 │
│ 1.0590169943749475 │
└ ┘
B_NW:
┌ ┐
│ -0.8090169943749475 │
│ 0.8090169943749475 │
│ 0.8994537199739336 │
│ 0.5 │
│ 1.0590169943749475 │
└ ┘
B_SW:
┌ ┐
│ -0.8090169943749475 │
│ -0.8090169943749475 │
│ 0.8994537199739336 │
│ 0.5 │
│ 1.0590169943749475 │
└ ┘
B_SE:
┌ ┐
│ 0.809033099711693 │
│ -0.8090330997116932 │
│ 0.8991650349038145 │
│ 0.5 │
│ 1.0587834364258994 │
└ ┘
Y_NE:
┌ ┐
│ 0.1069938166551964 │
│ 0.10687496051180567 │
│ 1.0184481498960403 │
│ 0.5 │
│ 0.5300532840864689 │
└ ┘
Y_NW:
┌ ┐
│ -0.10692428477988265 │
│ 0.10692428477988265 │
│ 1.018330847132124 │
│ 0.5 │
│ 0.5299316597860524 │
└ ┘
Y_SE:
┌ ┐
│ 0.10698231945637848 │
│ -0.10698231945639325 │
│ 1.018535901893324 │
│ 0.5 │
│ 0.5301529083990917 │
└ ┘
Y_SW:
┌ ┐
│ -0.10687496051180383 │
│ -0.1069938166551987 │
│ 1.018448149896045 │
│ 0.5 │
│ 0.5300532840864739 │
└ ┘
C_N:
┌ ┐
│ 0 │
│ 1 │
│ 1.4553466902253547 │
│ 0.5 │
│ 1.5590169943749472 │
└ ┘
C_W:
┌ ┐
│ -1 │
│ 0 │
│ 1.4553466902253547 │
│ 0.5 │
│ 1.5590169943749472 │
└ ┘
C_E:
┌ ┐
│ 0.999774682263142 │
│ 0.00007707371674579322 │
│ 1.4560976171636484 │
│ 0.5 │
│ 1.5598847602606936 │
└ ┘
C_S:
┌ ┐
│ -0.00007707371679479347 │
│ -0.9997746822631508 │
│ 1.4560976171636524 │
│ 0.5 │
│ 1.5598847602607082 │
└ ┘
D_NE:
┌ ┐
│ 0.19033806936716854 │
│ 0.19095328682585785 │
│ 2.0114149031061697 │
│ 0.5 │
│ 2.0592414502287557 │
└ ┘
D_NW:
┌ ┐
│ -0.19098096419177987 │
│ 0.19098096419177987 │
│ 2.011241314951004 │
│ 0.5 │
│ 2.0590184768076125 │
└ ┘
D_SE:
┌ ┐
│ 0.19032946838241013 │
│ -0.1903294683824241 │
│ 2.0115648207047037 │
│ 0.5 │
│ 2.0594218564511593 │
└ ┘
D_SW:
┌ ┐
│ -0.1909532868258615 │
│ -0.1903380693671672 │
│ 2.011414903106175 │
│ 0.5 │
│ 2.0592414502287664 │
└ ┘
E_N:
┌ ┐
│ -0.0004604038856374817 │
│ 1.0676219893284662 │
│ 2.4530572130770922 │
│ 0.5 │
│ 3.5786536184595112 │
└ ┘
E_W:
┌ ┐
│ -1.0676219893284706 │
│ 0.00046040388565697025 │
│ 2.4530572130770927 │
│ 0.5 │
│ 3.5786536184595152 │
└ ┘
E_E:
┌ ┐
│ 1.0666707731054204 │
│ 0.00046707469035518474 │
│ 2.4538581237635935 │
│ 0.5 │
│ 3.5796028507332176 │
└ ┘
E_S:
┌ ┐
│ -0.0004670746903934693 │
│ -1.0666707731054261 │
│ 2.4538581237635966 │
│ 0.5 │
│ 3.5796028507332323 │
└ ┘
F_NE:
┌ ┐
│ 0.2796758584560578 │
│ 0.28103193693793593 │
│ 3.003332401794294 │
│ 0.5 │
│ 4.588601770269869 │
└ ┘
F_NW:
┌ ┐
│ -0.2810301396616794 │
│ 0.28103013966168067 │
│ 3.003103384288446 │
│ 0.5 │
│ 4.588292426736586 │
└ ┘
F_SE:
┌ ┐
│ 0.2796768046605061 │
│ -0.2796768046605201 │
│ 3.003549612841133 │
│ 0.5 │
│ 4.588874270244861 │
└ ┘
F_SW:
┌ ┐
│ -0.2810319369379494 │
│ -0.2796758584560562 │
│ 3.0033324017942995 │
│ 0.5 │
│ 4.588601770269887 │
└ ┘
G_1:
┌ ┐
│ 0.4992113404748246 │
│ 1.2078950246429414 │
│ 3.3078353127534763 │
│ 0.5 │
│ 6.324999358939364 │
└ ┘
G_2:
┌ ┐
│ 1.2063182040451104 │
│ 0.5007887810363889 │
│ 3.308363220828225 │
│ 0.5 │
│ 6.325629722163805 │
└ ┘
G_4:
┌ ┐
│ 1.2063180313441202 │
│ -0.49921120092990906 │
│ 3.3087390625721245 │
│ 0.5 │
│ 6.326084592820001 │
└ ┘
G_5:
┌ ┐
│ 0.49921120092986965 │
│ -1.2063180313441402 │
│ 3.3087390625721245 │
│ 0.5 │
│ 6.326084592820007 │
└ ┘
G_7:
┌ ┐
│ -0.5007887810364288 │
│ -1.2063182040451044 │
│ 3.3083632208282268 │
│ 0.5 │
│ 6.325629722163823 │
└ ┘
G_8:
┌ ┐
│ -1.207895024642962 │
│ -0.4992113404748007 │
│ 3.307835312753477 │
│ 0.5 │
│ 6.32499935893938 │
└ ┘
G_10:
┌ ┐
│ -1.2078955260488684 │
│ 0.5007885331479526 │
│ 3.307456458408049 │
│ 0.5 │
│ 6.324533930139645 │
└ ┘
G_11:
┌ ┐
│ -0.5007885331479277 │
│ 1.2078955260488742 │
│ 3.3074564584080495 │
│ 0.5 │
│ 6.324533930139641 │
└ ┘

82
data554/processData.py Normal file
View file

@ -0,0 +1,82 @@
from math import fabs, nan, sqrt
import sys
vertices = {}
current_id = ""
for line in sys.stdin:
text = line.strip()
if text.endswith(":"):
new_id = text.strip(":")
vertices[new_id] = []
if current_id: print(current_id, vertices[current_id])
current_id = new_id
continue
remainder = text.strip("┌ ┐└┘│")
if len(remainder): vertices[current_id].append(float(remainder))
print(len(vertices), "vertices found")
P = True
F = False
HPHI = nan
RTHPHI = nan
RTPHIPH = nan
# Taken verbatim from test_assembly_chooser.rs
acron_data = [
("A_NE", [ 0.5, 0.5, 0.], P, 0, ""),
("A_NW", [-0.5, 0.5, 0.], P, 0, ""),
("A_SE", [ 0.5, -0.5, 0.], P, 0, ""),
("A_SW", [-0.5, -0.5, 0.], P, 0, ""),
("Z_E", [ 0.229, -0.002, 0.821], F, 1, "A_NE,A_SE"),
("Z_S", [ 0.002, -0.229, 0.821], F, 1, "A_SE,A_SW"),
("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"),
("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"),
("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"),
("D_SW", [-0.181, -0.2, 2.011], F, 5, "Y_SW,C_W,C_S"),
("E_N", [ 0.012, 1.055, 2.46], F, 6, "C_N,D_NE,D_NW"),
("E_W", [-1.055, -0.012, 2.46], F, 6, "C_W,D_NW,D_SW"),
("E_E", [ 1.079, -0.012, 2.447], F, 6, "C_E,D_NE,D_SE"),
("E_S", [ 0.012, -1.079, 2.447], F, 6, "C_S,D_SE,D_SW"),
("F_NE", [ 0.296, 0.265, 3.003], F, 7, "D_NE,E_N,E_E"),
("F_NW", [-0.265, 0.265, 3.007], F, 7, "D_NW,E_N,E_W"),
("F_SE", [ 0.296, -0.296, 3.0], F, 7, "D_SE,E_E,E_S"),
("F_SW", [-0.265, -0.296, 3.003], F, 7, "D_SW,E_W,E_S"),
# The following must be in order around the octagon (in some orientation)
("G_1", [ 0.517, 1.19, 3.312], F, 8, "E_N,F_NE"),
("G_2", [ 1.224, 0.483, 3.304], F, 8, "E_E,F_NE"),
("G_4", [ 1.224, -0.517, 3.298], F, 8, "E_E,F_SE"),
("G_5", [ 0.517, -1.224, 3.298], F, 8, "E_S,F_SE"),
("G_7", [-0.483, -1.224, 3.304], F, 8, "E_S,F_SW"),
("G_8", [-1.19, -0.517, 3.312], F, 8, "E_W,F_SW"),
("G_10", [-1.19, 0.483, 3.318], F, 8, "E_W,F_NW"),
("G_11", [-0.483, 1.19, 3.318], F, 8, "E_N,F_NW"),
]
E = 0.0
for vi in range(0, len(acron_data)):
start_id = acron_data[vi][0]
start = vertices[start_id]
ends = acron_data[vi][4].split(",")
if acron_data[vi][3] == 8:
if start_id != "G_1":
ends.append(acron_data[vi-1][0])
if vi+1 == len(acron_data):
ends.append("G_1")
for end_id in ends:
if not(end_id): continue
end = vertices[end_id]
dist = sqrt(
(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)
print(f"----> Total distortion E={E}")