mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
added new quotient spaces: Bring's, Schmutz's M(2), Schmutz's M(3)
This commit is contained in:
parent
b4671e4d50
commit
64da329f8e
52
cell.cpp
52
cell.cpp
@ -776,6 +776,58 @@ struct hrmap_quotient : hrmap {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case gBring: {
|
||||||
|
connections = {
|
||||||
|
/* 000 */ 5, 92, 46, 33, 14,
|
||||||
|
/* 001 */ 0, 62, 56, 38, 24,
|
||||||
|
/* 002 */ 15, 97, 76, 63, 4,
|
||||||
|
/* 003 */ 10, 32, 86, 68, 29,
|
||||||
|
/* 004 */ 25, 67, 106, 93, 9,
|
||||||
|
/* 005 */ 20, 37, 116, 98, 19,
|
||||||
|
/* 006 */ 35, 102, 16, 3, 44,
|
||||||
|
/* 007 */ 30, 72, 26, 8, 54,
|
||||||
|
/* 008 */ 45, 107, 66, 73, 34,
|
||||||
|
/* 009 */ 40, 2, 81, 78, 59,
|
||||||
|
/* 010 */ 55, 77, 96, 103, 39,
|
||||||
|
/* 011 */ 50, 7, 111, 108, 49,
|
||||||
|
/* 012 */ 65, 112, 6, 13, 74,
|
||||||
|
/* 013 */ 60, 42, 21, 18, 84,
|
||||||
|
/* 014 */ 75, 117, 36, 43, 64,
|
||||||
|
/* 015 */ 70, 12, 51, 48, 89,
|
||||||
|
/* 016 */ 85, 47, 91, 113, 69,
|
||||||
|
/* 017 */ 80, 17, 101, 118, 79,
|
||||||
|
/* 018 */ 95, 82, 1, 23, 104,
|
||||||
|
/* 019 */ 90, 52, 11, 28, 114,
|
||||||
|
/* 020 */ 105, 87, 31, 53, 94,
|
||||||
|
/* 021 */ 100, 22, 41, 58, 119,
|
||||||
|
/* 022 */ 115, 57, 61, 83, 99,
|
||||||
|
/* 023 */ 110, 27, 71, 88, 109,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case gSchmutzM2: {
|
||||||
|
connections = {
|
||||||
|
23, 47, 27, 14, 38, 30, 17, 41, 33, 20, 44, 24,
|
||||||
|
35, 39, 3, 26, 42, 6, 29, 45, 9, 32, 36, 0,
|
||||||
|
11, 43, 15, 2, 46, 18, 5, 37, 21, 8, 40, 12,
|
||||||
|
22, 31, 4, 13, 34, 7, 16, 25, 10, 19, 28, 1,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case gSchmutzM3: {
|
||||||
|
connections = {
|
||||||
|
23, 47, 64, 28, 15, 39, 68, 32, 19, 43, 60, 24,
|
||||||
|
35, 52, 40, 4, 27, 56, 44, 8, 31, 48, 36, 0,
|
||||||
|
11, 71, 57, 16, 3, 63, 49, 20, 7, 67, 53, 12,
|
||||||
|
22, 59, 69, 5, 14, 51, 61, 9, 18, 55, 65, 1,
|
||||||
|
21, 30, 62, 41, 13, 34, 66, 45, 17, 26, 70, 37,
|
||||||
|
10, 42, 50, 29, 2, 46, 54, 33, 6, 38, 58, 25,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1683,6 +1683,9 @@ geometryinfo ginf[gGUARD] = {
|
|||||||
{"binary tiling", "binary", 7, 3, 0, gcHyperbolic, 0, {{7, 5}}, eVariation::pure},
|
{"binary tiling", "binary", 7, 3, 0, gcHyperbolic, 0, {{7, 5}}, eVariation::pure},
|
||||||
{"Archimedean", "A", 7, 3, 0, gcHyperbolic, 0, {{7, 5}}, eVariation::pure},
|
{"Archimedean", "A", 7, 3, 0, gcHyperbolic, 0, {{7, 5}}, eVariation::pure},
|
||||||
{"Macbeath surface", "Macbeath", 7, 3, qSMALL, gcHyperbolic, 0x18800, {{7, 5}}, eVariation::bitruncated},
|
{"Macbeath surface", "Macbeath", 7, 3, qSMALL, gcHyperbolic, 0x18800, {{7, 5}}, eVariation::bitruncated},
|
||||||
|
{"Bring's Surface", "Bring", 5, 4, qSMALL, gcHyperbolic, 0x18A00, {{6, 4}}, eVariation::bitruncated},
|
||||||
|
{"Schmutz's M(3)", "M3", 12, 3, qSMALL, gcHyperbolic, 0x18C00, {{4, 2}}, eVariation::bitruncated},
|
||||||
|
{"Schmutz's M(4)", "M4", 12, 3, qSMALL, gcHyperbolic, 0x18E00, {{4, 2}}, eVariation::bitruncated},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define X3(x) x, x, x
|
#define X3(x) x, x, x
|
||||||
|
@ -200,7 +200,8 @@ enum eLand { laNone, laBarrier, laCrossroads, laDesert, laIce, laCaves, laJungle
|
|||||||
|
|
||||||
enum eGeometry {
|
enum eGeometry {
|
||||||
gNormal, gEuclid, gSphere, gElliptic, gZebraQuotient, gFieldQuotient, gTorus, gOctagon, g45, g46, g47, gSmallSphere, gTinySphere, gEuclidSquare, gSmallElliptic,
|
gNormal, gEuclid, gSphere, gElliptic, gZebraQuotient, gFieldQuotient, gTorus, gOctagon, g45, g46, g47, gSmallSphere, gTinySphere, gEuclidSquare, gSmallElliptic,
|
||||||
gKleinQuartic, gBolza, gBolza2, gMinimal, gBinaryTiling, gArchimedean, gMacbeath,
|
gKleinQuartic, gBolza, gBolza2, gMinimal, gBinaryTiling, gArchimedean,
|
||||||
|
gMacbeath, gBring, gSchmutzM2, gSchmutzM3,
|
||||||
gGUARD};
|
gGUARD};
|
||||||
|
|
||||||
enum eGeometryClass { gcHyperbolic, gcEuclid, gcSphere };
|
enum eGeometryClass { gcHyperbolic, gcEuclid, gcSphere };
|
||||||
|
@ -145,7 +145,7 @@ transmatrix calc_relative_matrix(cell *c2, cell *c1, const hyperpoint& point_hin
|
|||||||
int sp = h2->c.spin(d);
|
int sp = h2->c.spin(d);
|
||||||
return gm * heptmove[sp] * spin(2*M_PI*d/S7) * where;
|
return gm * heptmove[sp] * spin(2*M_PI*d/S7) * where;
|
||||||
}
|
}
|
||||||
if(geometry == gFieldQuotient) {
|
if(among(geometry, gFieldQuotient, gBring, gMacbeath)) {
|
||||||
int bestdist = 1000, bestd = 0;
|
int bestdist = 1000, bestd = 0;
|
||||||
for(int d=0; d<S7; d++) {
|
for(int d=0; d<S7; d++) {
|
||||||
int dist = celldistance(h2->move(d)->c7, c1);
|
int dist = celldistance(h2->move(d)->c7, c1);
|
||||||
|
@ -525,7 +525,7 @@ namespace hr { namespace gp {
|
|||||||
return normalize(spin(2*M_PI*sp/S7) * cornmul(T, corner));
|
return normalize(spin(2*M_PI*sp/S7) * cornmul(T, corner));
|
||||||
}
|
}
|
||||||
|
|
||||||
transmatrix Tf[8][32][32][6];
|
transmatrix Tf[MAX_EDGE][32][32][6];
|
||||||
|
|
||||||
transmatrix corners;
|
transmatrix corners;
|
||||||
|
|
||||||
@ -594,6 +594,8 @@ namespace hr { namespace gp {
|
|||||||
base_distlimit = (base_distlimit + log(scale) / log(2.618)) / scale;
|
base_distlimit = (base_distlimit + log(scale) / log(2.618)) / scale;
|
||||||
else
|
else
|
||||||
base_distlimit = 3 * max(param.first, param.second) + 2 * min(param.first, param.second);
|
base_distlimit = 3 * max(param.first, param.second) + 2 * min(param.first, param.second);
|
||||||
|
if(S7 == 12)
|
||||||
|
base_distlimit = 2 * param.first + 2 * param.second + 1;
|
||||||
if(base_distlimit > SEE_ALL)
|
if(base_distlimit > SEE_ALL)
|
||||||
base_distlimit = SEE_ALL;
|
base_distlimit = SEE_ALL;
|
||||||
prepare_matrices();
|
prepare_matrices();
|
||||||
|
2
hyper.h
2
hyper.h
@ -3480,7 +3480,7 @@ namespace gp {
|
|||||||
extern int last_dir(cell *c);
|
extern int last_dir(cell *c);
|
||||||
extern void configure();
|
extern void configure();
|
||||||
extern ld alpha;
|
extern ld alpha;
|
||||||
extern transmatrix Tf[8][32][32][6];
|
extern transmatrix Tf[MAX_EDGE][32][32][6];
|
||||||
|
|
||||||
loc operator+(loc e1, loc e2);
|
loc operator+(loc e1, loc e2);
|
||||||
loc operator-(loc e1, loc e2);
|
loc operator-(loc e1, loc e2);
|
||||||
|
Loading…
Reference in New Issue
Block a user