crystal:: added multi-dimensional geometries (referred to as crystal), available via CLI for now

This commit is contained in:
Zeno Rogue committed 2018-12-14 19:27:11 +01:00
1 parent cd357303b9
commit fd3b030119
9 files changed
+483 -4

No files matched your search

+2 -2
View File
@@ -140,10 +140,10 @@ transmatrix calc_relative_matrix(cell *c2, cell *c1, const hyperpoint& point_hin
int sp = h2->c.spin(d);
return gm * heptmove[sp] * spin(2*M_PI*d/S7) * where;
}
if(among(geometry, gFieldQuotient, gBring, gMacbeath)) {
if(among(geometry, gFieldQuotient, gBring, gMacbeath, gCrystal)) {
int bestdist = 1000, bestd = 0;
for(int d=0; d<S7; d++) {
int dist = celldistance(h2->move(d)->c7, c1);
int dist = celldistance(h2->cmove(d)->c7, c1);
if(dist < bestdist) bestdist = dist, bestd = d;
}
int sp = h2->c.spin(bestd);