diff --git a/binary-tiling.cpp b/binary-tiling.cpp index e6b23da0..6cfe4bb1 100644 --- a/binary-tiling.cpp +++ b/binary-tiling.cpp @@ -343,6 +343,13 @@ auto bt_config = addHook(hooks_args, 0, [] () { }); #endif +bool pseudohept(cell *c) { + if(DIM == 2) + return c->type & c->master->distance & 1; + else + return (c->master->zebraval == 1) && (c->master->distance & 1); + } + int celldistance3(cell *c1, cell *c2) { // [untested] int steps = 0; int d1 = celldistAlt(c1); diff --git a/euclid.cpp b/euclid.cpp index a4e523db..6d5c5354 100644 --- a/euclid.cpp +++ b/euclid.cpp @@ -528,6 +528,12 @@ namespace euclid3 { return x; } + bool pseudohept(cell *c) { + coord co = cubemap()->ispacemap[c->master]; + for(int i=0; i<3; i++) if(!(getcoord(co, i) & 1)) return false; + return true; + } + void draw() { dq::visited.clear(); dq::enqueue(viewctr.at, cview()); diff --git a/pattern2.cpp b/pattern2.cpp index 5f6e4bc6..ca172be6 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1287,7 +1287,15 @@ bool pseudohept(cell *c) { #if CAP_IRR if(IRREGULAR) return irr::pseudohept(c); #endif - if(binarytiling) return c->type & c->master->distance & 1; + #if CAP_BT + if(binarytiling) return binary::pseudohept(c); + #endif + #if MAXDIM == 4 + if(DIM == 3) { + if(euclid) return euclid3::pseudohept(c); + if(sphere) return sphere3::pseudohept(c); + } + #endif #if CAP_ARCM if(archimedean) return arcm::pseudohept(c); #endif diff --git a/sphere.cpp b/sphere.cpp index 2022aa37..4143770b 100644 --- a/sphere.cpp +++ b/sphere.cpp @@ -378,6 +378,10 @@ transmatrix relative_matrix(heptagon *h2, heptagon *h1) { return inverse(gmatr(h1)) * gmatr(h2); } +bool pseudohept(cell *c) { + return c->master->zebraval < 16; + } + void draw() { sphereflip = Id; auto m = (hrmap_spherical3*) currentmap;