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