Rev 18400 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
18400 | bpr | 1 | !set slib_header_coxhyp=\ |
18388 | bpr | 2 | \\ Action du groupe de Moebius etendu\ |
18364 | bpr | 3 | \\ Homographie ou antihomographie selon que g[3] vaut 0 ou 1.\ |
18388 | bpr | 4 | mob(g,z)=if(g[3],z=conj(z));(g[1]*z+g[2])/(conj(g[2])*z+conj(g[1]));\ |
5 | \\ Produit et inverse dans le groupe de Moebius etendu\ |
||
18387 | bpr | 6 | mobx(g)=[g[1],g[2];conj(g[2]),conj(g[1])];\ |
7 | mob_mul(g1,g2)=my(m=mobx(g1)*mobx(if(g1[3],conj(g2),g2)));[m[1,1],m[1,2],g1[3]!=g2[3]];\ |
||
18388 | bpr | 8 | mob_inv(g)=if(g[3],[g[1],-conj(g[2]),1],[conj(g[1]),-g[2],0]);\ |
18364 | bpr | 9 | \ |
18400 | bpr | 10 | hyp3(p,q,r,eps,depl)={\ |
18388 | bpr | 11 | my(m=[1,p,q;p,1,r;q,r,1],nf0,nf1,nf2,f1,f2,nbs,snb,\ |
18400 | bpr | 12 | ff1,s,t,u,g,gg,ggg,g1,x,y,z,res1,res2,ses1,r2,l,\ |
18364 | bpr | 13 | ep=exp(I*(Pi/p)),\ |
14 | eq=exp(I*(Pi/q)),\ |
||
15 | er=exp(I*(Pi/r)),\ |
||
16 | a=0,\ |
||
17 | b=sqrt((cos(Pi/r)+cos(Pi/p+Pi/q))/(cos(Pi/r)+cos(Pi/p-Pi/q))),\ |
||
18 | c=ep*sqrt((cos(Pi/q)+cos(Pi/p+Pi/r))/(cos(Pi/q)+cos(Pi/p-Pi/r))),\ |
||
18400 | bpr | 19 | mm=(b*c*conj(b-c)+c-b)/(conj(b)*c-conj(c)*b));\ |
20 | my(N=20); if(eps<1,\ |
||
21 | r2=(1-eps)^2;l=N*round(4*r2/(1-r2)/(1-1/p-1/q-1/r)),\ |
||
22 | l=eps; eps=4*N/(l*(1-1/p-1/q-1/r)+4*N));\ |
||
23 | my(cd0=vector(l), \\ pour chaque f, les numeros des 3 aretes du bord de la chambre f\ |
||
18388 | bpr | 24 | ce0=vector(l), \\ et l'element g du groupe qui envoie la chambre 1 sur la chambre f\ |
18364 | bpr | 25 | cd1=vector(2*l+1),\\ pour chaque a, les numeros des extremites de a\ |
26 | ce1=vector(2*l+1),\\ et le numero de la premiere chambre qu'elle borde\ |
||
18465 | bpr | 27 | cd2=vector(l+2),\\ pour chaque s, le nombre d'aretes manquantes,\ |
18388 | bpr | 28 | ce2=vector(l+2),\\ les deux aretes qui bordent le secteur restant\ |
29 | cf2=vector(l+2),\\ coordonnees du sommet\ |
||
30 | cg2=vector(l+2) \\ le sommet est dans la zone centrale\ |
||
18364 | bpr | 31 | );\ |
18388 | bpr | 32 | \\ Les trois reflexions qui engendrent W\ |
33 | g=[[1,0,1],[ep,0,1],[I*mm,-I,1]];\ |
||
18400 | bpr | 34 | if(depl,\ |
35 | a=mob(depl,a); b=mob(depl,b); c=mob(depl,c);\ |
||
36 | g=vector(3,i,mob_mul(depl,mob_mul(g[i],mob_inv(depl)))),\ |
||
37 | depl=[1,0,0]);\ |
||
18388 | bpr | 38 | \ |
18364 | bpr | 39 | \\ Creation de la premiere chambre et de son squelette\ |
40 | cd0[nf0=1]=vector(3,s,s);\ |
||
41 | ce0[nf0]=[1,0,0]; \\ Identite\ |
||
42 | for (s = 1, 3,\ |
||
43 | cd1[nf1+=1] = vector(4, t, if(t>3,s,-1));\ |
||
44 | ce1[nf1]=1;\ |
||
18465 | bpr | 45 | for (t=1, s-1,\ |
18364 | bpr | 46 | cd2[nf2+=1] = 2*m[s,t]-2;\ |
47 | ce2[nf2] = [s,t];\ |
||
18388 | bpr | 48 | snb=6-s-t;\ |
49 | cf2[nf2]=if(snb==1,c,if(snb==2,b,a));\ |
||
50 | cg2[nf2]=(sqrt(norm(cf2[nf2]))+eps)<1;\ |
||
18364 | bpr | 51 | cd1[t][s] = cd1[s][t] = nf2));\ |
18388 | bpr | 52 | while(f1<nf1 && nf0<l, f1+=1; v1=cd1[f1];\ |
53 | if((s=v1[4]) && (cg2[v1[s%3+1]] || cg2[v1[5-s-s%3]]), \\ arete a traiter\ |
||
18364 | bpr | 54 | \\ element du groupe associe au triangle precedent\ |
55 | gg=ce0[ce1[f1]];\ |
||
56 | \\ Nouveau triangle et ses aretes, manquantes ou pas\ |
||
18388 | bpr | 57 | ce0[nf0+=1]=ggg=mob_mul(gg,g[s]);\ |
58 | w0=vector(3); w0[s]=f1; new=vector(3,t,if(t!=s,cd2[v1[t]]));\ |
||
18364 | bpr | 59 | for(t=1, 3, if(t!=s, f2=v1[t]; if(new[t],\ |
60 | w1=vector(4); w1[4]=t; w1[s]=f2; w1[t]=-1;\ |
||
61 | cd1[nf1+=1]=w1; ce1[nf1]=nf0; cd2[f2]=new[t]-1; ce2[f2]=w0[t]=nf1,\ |
||
62 | g1=w0[t]=ce2[f2]; cd1[g1][4]=0)));\ |
||
63 | \\ Mise a jour (et creation si necessaire) des sommets non encore traites\ |
||
18387 | bpr | 64 | for(t=1,3,if(new[t], g1=w0[t];\ |
18465 | bpr | 65 | for(u=1,3,if((u!=t) && (u!=s),\ |
66 | if(new[u],\ |
||
18388 | bpr | 67 | if(w0[u]<g1, cd2[nf2+=1]=2*m[t,u]-2; ce2[nf2]=g1;\ |
68 | snb=6-t-u;\ |
||
69 | cf2[nf2]=mob(ggg,if(snb==1,c,if(snb==2,b,a)));\ |
||
70 | cg2[nf2]=(sqrt(norm(cf2[nf2]))+eps)<1;\ |
||
71 | cd1[w0[u]][t]=cd1[g1][u]=nf2),\ |
||
72 | cd1[g1][u]=f2=cd1[w0[u]][t]; cd2[f2]-=1; ce2[f2]=g1)))));\ |
||
73 | cd0[nf0]=w0;\ |
||
74 | )\ |
||
18364 | bpr | 75 | );\ |
18388 | bpr | 76 | [matrix(nf2,2,i,j,if(j==1,real(cf2[i]),imag(cf2[i]))),\ |
77 | matrix(nf0,4,i,j,if(j<4,cd1[cd0[i][j%3+1]][5-j-j%3],ce0[i][3]))]\ |
||
78 | } |