From 6a324fedfdb58ffb0ee2f04bd93ead7cfb2ee8a2 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 22 Jun 2025 19:02:05 +0200 Subject: [PATCH] factored out build_regular_spins, and fixed a crash while doing fake in 434 --- euclid.cpp | 5 +++ reg3.cpp | 96 +++++++++++++++++++++++++++++------------------------- 2 files changed, 56 insertions(+), 45 deletions(-) diff --git a/euclid.cpp b/euclid.cpp index 32701fdb..5ccca0ea 100644 --- a/euclid.cpp +++ b/euclid.cpp @@ -1439,6 +1439,11 @@ EX void generate() { } hsh.compute_hept(); + + if(geometry == gCubeTiling) { + cgi.loop = 4; + reg3::build_regular_spins(1, 90._deg); + } #endif } diff --git a/reg3.cpp b/reg3.cpp index 87a0254f..ade5236d 100644 --- a/reg3.cpp +++ b/reg3.cpp @@ -195,6 +195,56 @@ EX namespace reg3 { } } + EX void build_regular_spins(ld between_centers, ld angle_between_faces) { + auto& spins = cgi.spins; + int& face = cgi.face; + + if(S7 == 20) { + spins[0] = Id; + spins[1] = cspin(0, 1, angle_between_faces) * cspin180(1, 2); + spins[2] = spins[1] * cspin(1, 2, -TAU/face) * spins[1]; + spins[3] = spins[1] * cspin(1, 2, +TAU/face) * spins[1]; + for(int a=4; a<10; a++) spins[a] = cspin(1, 2, TAU/face) * spins[a-3]; + for(int a=S7/2; a