From 7e578527884615bd5f0292702ac9bce75f18fd5f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 30 Sep 2021 13:11:55 +0200 Subject: [PATCH] gp:: pBring works with GP(2,2) and larger --- goldberg.cpp | 53 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/goldberg.cpp b/goldberg.cpp index 111bbfd3..5f3d30e3 100644 --- a/goldberg.cpp +++ b/goldberg.cpp @@ -355,11 +355,15 @@ EX namespace gp { } } - if(S3 == 4 && param == loc(1,1)) { + auto fix_mirrors = [&] { if(ac1.cw.mirrored != hs.mirrored) ac1.cw--; if(ac2.cw.mirrored != hs.mirrored) ac2.cw--; auto& ac3 = get_mapping(vc[2]); if(ac3.cw.mirrored != hs.mirrored) ac3.cw--; + }; + + if(S3 == 4 && param == loc(1,1)) { + fix_mirrors(); conn(loc(0,0), 1); conn(loc(0,1), 0); conn(loc(0,1), 1); @@ -367,11 +371,54 @@ EX namespace gp { conn(loc(0,1), 3); return; } + + if(S3 == 4 && param.first == param.second && nonorientable) { + fix_mirrors(); + + int size = param.first; + + // go along the boundary of the 'diamond' + + for(int dir=0; dir<4; dir++) { + int dir_orth = (dir+1) & 3; + + loc at = vc[dir]; + + for(int i=0; i