SLR works with Archimedean
This commit is contained in:
parent
7bd80dab18
commit
afa3cd599d
|
@ -942,8 +942,8 @@ void draw_shape_for_texture(floorshape* sh) {
|
||||||
hyperpoint v1 = hpxyz3(0.25, 0.25, 0, 0);
|
hyperpoint v1 = hpxyz3(0.25, 0.25, 0, 0);
|
||||||
hyperpoint v2 = hpxyz3(0.25, -0.25, 0, 0);
|
hyperpoint v2 = hpxyz3(0.25, -0.25, 0, 0);
|
||||||
|
|
||||||
// SL2 needs 42
|
// SL2 needs 6 times more
|
||||||
for(int a=0; a<max(MAX_EDGE, 42); a++)
|
for(int a=0; a<MAX_EDGE*6; a++)
|
||||||
texture_order([&] (ld x, ld y) {
|
texture_order([&] (ld x, ld y) {
|
||||||
hyperpoint h = center + v1 * x + v2 * y;
|
hyperpoint h = center + v1 * x + v2 * y;
|
||||||
hyperpoint inmodel;
|
hyperpoint inmodel;
|
||||||
|
|
14
geometry.cpp
14
geometry.cpp
|
@ -576,9 +576,17 @@ void geometry_information::prepare_basics() {
|
||||||
steps = 0;
|
steps = 0;
|
||||||
single_step = 1;
|
single_step = 1;
|
||||||
if(sl2) {
|
if(sl2) {
|
||||||
single_step = S3 * S7 - 2 * S7 - 2 * S3;
|
if(hybrid::underlying == gArchimedean) {
|
||||||
steps = 2 * S7;
|
ld s = arcm::current.euclidean_angle_sum - 2;
|
||||||
if(BITRUNCATED) steps *= S3;
|
single_step = 2;
|
||||||
|
DEBB(DF_GEOM | DF_POLY, ("1/s = ", 1/s));
|
||||||
|
steps = 4/s + .5;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
single_step = S3 * S7 - 2 * S7 - 2 * S3;
|
||||||
|
steps = 2 * S7;
|
||||||
|
if(BITRUNCATED) steps *= S3;
|
||||||
|
}
|
||||||
DEBB(DF_GEOM | DF_POLY, ("steps = ", steps, " / ", single_step));
|
DEBB(DF_GEOM | DF_POLY, ("steps = ", steps, " / ", single_step));
|
||||||
plevel = M_PI * single_step / steps;
|
plevel = M_PI * single_step / steps;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1103,7 +1103,8 @@ EX namespace slr {
|
||||||
transmatrix relative_matrix(cell *c1, int i) {
|
transmatrix relative_matrix(cell *c1, int i) {
|
||||||
if(i == c1->type-2) return zpush(-cgi.plevel) * spin(-2*cgi.plevel);
|
if(i == c1->type-2) return zpush(-cgi.plevel) * spin(-2*cgi.plevel);
|
||||||
if(i == c1->type-1) return zpush(+cgi.plevel) * spin(+2*cgi.plevel);
|
if(i == c1->type-1) return zpush(+cgi.plevel) * spin(+2*cgi.plevel);
|
||||||
if(PURE && !archimedean) {
|
if(PURE && hybrid::underlying != gArchimedean) {
|
||||||
|
/* todo: always do something like this! */
|
||||||
int j = c1->c.spin(i);
|
int j = c1->c.spin(i);
|
||||||
ld A = master_to_c7_angle();
|
ld A = master_to_c7_angle();
|
||||||
transmatrix Q = spin(-A + 2 * M_PI * i / S7) * xpush(cgi.tessf) * spin(M_PI - 2 * M_PI * j / S7 + A);
|
transmatrix Q = spin(-A + 2 * M_PI * i / S7) * xpush(cgi.tessf) * spin(M_PI - 2 * M_PI * j / S7 + A);
|
||||||
|
|
Loading…
Reference in New Issue