generate beautiful pictures of the complex Anosov set

This commit is contained in:
Florian Stecker
2022-06-15 12:20:45 +02:00
parent 729d1a10b7
commit 429f0890d6
6 changed files with 362 additions and 156 deletions

View File

@@ -3,39 +3,39 @@
#define LOOP(i,n) for(int i = 0; i < (n); i++)
void generators_triangle_reflection_generic(mat *gen, NUMBER rho1, NUMBER rho2, NUMBER rho3, NUMBER q)
void generators_triangle_reflection_generic(mat *gen, NUMBER sqrho1, NUMBER sqrho2, NUMBER sqrho3, NUMBER t)
{
NUMBER tmp;
NUMBER qinv;
TYPE t = GETTYPE(rho1);
NUMBER tinv;
TYPE type = GETTYPE(sqrho1);
INIT(tmp, t);
INIT(qinv, t);
INV(qinv, q);
INIT(tmp, type);
INIT(tinv, type);
INV(tinv, t);
LOOP(i, 3) {
mat_init(gen[i], 3, t);
mat_init(gen[i], 3, type);
mat_zero(gen[i]);
LOOP(j, 3) {
SET_INT(*mat_ref(gen[i], j, j), i == j ? 1 : -1);
}
}
MUL(tmp, q, rho1);
MUL(tmp, t, sqrho1);
NEG(*mat_ref(gen[2], 1, 2), tmp);
MUL(tmp, q, rho2);
NEG(*mat_ref(gen[0], 2, 0), tmp);
MUL(tmp, q, rho3);
NEG(*mat_ref(gen[1], 0, 1), tmp);
NEG(*mat_ref(gen[0], 2, 0), sqrho2);
NEG(*mat_ref(gen[1], 0, 1), sqrho3);
NEG(*mat_ref(gen[1], 2, 1), qinv);
NEG(*mat_ref(gen[2], 0, 2), qinv);
NEG(*mat_ref(gen[0], 1, 0), qinv);
MUL(tmp, tinv, sqrho1);
NEG(*mat_ref(gen[1], 2, 1), tmp);
NEG(*mat_ref(gen[2], 0, 2), sqrho2);
NEG(*mat_ref(gen[0], 1, 0), sqrho3);
CLEAR(tmp);
CLEAR(qinv);
CLEAR(tinv);
}
// warning: this is not compatible anymore!
int generators_triangle_reflection_group(mat *gen, int p1, int p2, int p3, int q1, int q2, int q3, mpq_t t)
{
int p[3] = {p1, p2, p3};
@@ -107,23 +107,23 @@ int generators_triangle_reflection_group_555_complex(mat *gen, int q1, int q2, i
int q[3] = {q1, q2, q3};
NUMBER rho[3];
LOOP(i, 3) INIT(rho[i], QT_GAUSS_SQRT5);
NUMBER sqrho[3];
LOOP(i, 3) INIT(sqrho[i], QT_GAUSS_SQRT5);
// compute rho1, rho2, rho3
// compute sqrho1, sqrho2, sqrho3
LOOP(i, 3) {
if(q[i] == 1) {
// 4cos(pi/5)^2 = 3/2 + 1/2*sqrt(5)
mpq_set_si(rho[i]->a[0], 3, 2);
mpq_set_si(rho[i]->a[1], 7, 12);
mpq_set_si(rho[i]->a[2], 0, 1);
mpq_set_si(rho[i]->a[3], -1, 24);
// 2cos(pi/5) = 1/2 + 1/2*sqrt(5) = 1/2 + 7/12 a - 1/24 a^3
mpq_set_si(sqrho[i]->a[0], 1, 2);
mpq_set_si(sqrho[i]->a[1], 7, 12);
mpq_set_si(sqrho[i]->a[2], 0, 1);
mpq_set_si(sqrho[i]->a[3], -1, 24);
} else if(q[i] == 2) {
// 4cos(pi/5)^2 = 3/2 - 1/2*sqrt(5)
mpq_set_si(rho[i]->a[0], 3, 2);
mpq_set_si(rho[i]->a[1], -7, 12);
mpq_set_si(rho[i]->a[2], 0, 1);
mpq_set_si(rho[i]->a[3], 1, 24);
// 2cos(pi/5) = -1/2 + 1/2*sqrt(5)
mpq_set_si(sqrho[i]->a[0], -1, 2);
mpq_set_si(sqrho[i]->a[1], 7, 12);
mpq_set_si(sqrho[i]->a[2], 0, 1);
mpq_set_si(sqrho[i]->a[3], -1, 24);
} else {
return 0;
}
@@ -138,9 +138,9 @@ int generators_triangle_reflection_group_555_complex(mat *gen, int q1, int q2, i
mpq_set_si(param->a[3], 1, 12);
mpq_mul(param->a[3], param->a[3], timag);
generators_triangle_reflection_generic(gen, rho[0], rho[1], rho[2], param);
generators_triangle_reflection_generic(gen, sqrho[0], sqrho[1], sqrho[2], param);
LOOP(i, 3) CLEAR(rho[i]);
LOOP(i, 3) CLEAR(sqrho[i]);
CLEAR(param);
return 1;