diff --git a/README.md b/README.md index 9cd1956..945d1b7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,22 @@ # asymptote-config This is my personal config directory for asymptote, the descriptive vector graphics language. + +# Contents +My config directory contains packages from the following authors: +- Christophe Grospellier for `cg_inequations.asy`. +- G. Marris for `gm_probabilitytree.asy`, `gm_tableaux.asy` and `gm.asy`. +- Jens Schwaiger for `js_polyhedron` and `js_tube.asy`. +- Philippe Ivaldi for all files starting with `pi`. +- Mine for `jl_lib.asy`, which only use some of the previous packages. +- My global config file for asymptote which produce `.svg` files. + +# Installation +1. Clone this repository into your $HOME as the hidden config directory for asymptote : + +`git clone https://github.com/jefflance/asymptote-config.git $HOME/.asy` + +2. Enjoy ! + +# Troubleshootings +This files aren't really up to date and may contains some bugs which are actually removed. +Feel free to tell me. diff --git a/cg_inequations.asy b/cg_inequations.asy new file mode 100644 index 0000000..8bd66cd --- /dev/null +++ b/cg_inequations.asy @@ -0,0 +1,163 @@ +// v4 29/10/2011, Christophe Grospellier. + +// INSTALLATION: +// copier ce fichier dans le sous-répertoire $HOME/.asy +// Move this file in the sub-directory $HOME/.asy + +//CODE: + +import graph; +import patterns; + +int lsol=0, rsol=1; +real hHatch=.2*cm; // Demi-hauteur des hachures +real hBrack=.3*cm, wBrack=2*hBrack/3; // Demi-hauteur et largeur du crochet +real extrem, bornebis; + +//////////////////////////////////////////////////////////////////////// +// a="écriture LaTeX de la solution" , borne=borne de l'inéquation // +// position=position du label (N par défaut) // +// dirsol=lsol (0) ou rsol : solutions à gauche ou à droite // +// brack="]" ou "[" // +// solcolor=couleur des solutions // +// xMin et xMax=abscisses mini et maxi de l'axe // +// ticks=Ticks("%",Step=...,step=...) ou Noticks() // +// solutions=true ou false : écrire "solutions" // +// hach=true ou false : dessiner les hachures // +//////////////////////////////////////////////////////////////////////// + +// Place un crochet "où on veut" +void bracket(picture pic=currentpicture, Label L="", real a, pair pos=N, string sensc, pen p=currentpen){ + real sens; + label(pic,Label(L,p),(a,0),3.5*pos); + if (sensc=="]"){sens=-1;} + else {sens=1;} + pair hB=(0,hBrack), wB=(wBrack,0); + pic.add(new void(frame f, transform t) { + pair z=t*(a,0); + draw(f,z-hB--z+hB,p); + draw(f,z-hB--z-hB+sens*wB,p); + draw(f,z+hB--z+hB+sens*wB,p);}); +} + + +// Trace un intervalle +void interval(picture pic=currentpicture, Label L1="", real a1, pair pos1=N, string sensc1, + Label L2="", real a2, pair pos2=N, string sensc2, + real xMin=min(a1,a2)-2.5, real xMax=max(a1,a2)+2.5, + ticks ticks=Ticks(), pen p=currentpen){ + xlimits(pic,min=xMin,max=xMax); + xaxis(pic,Label("$x$",align=N),ticks,Arrow); + bracket(pic,L1,a1,pos1,sensc1,p); + bracket(pic,L2,a2,pos2,sensc2,p); + draw(pic,(a1,0)--(a2,0),p); +} + +// Trace des hachures "où on veut" +void hatching(picture pic=currentpicture, + real mini, real maxi, real hHatching=2mm, + string myHatch){ + pair hH=(0,hHatch); + pic.add(new void(frame f, transform t) { + pair m=t*(mini,0), M=t*(maxi,0); + fill(f,m-hH--m+hH--M+hH--M-hH--cycle,pattern(myHatch));}); +} + + +// Solutions d'inéquation +void solonaxis(picture pic=currentpicture, + string a="", + real borne, + pair position=N, + int dirsol, + string brack, + pen solcolor=currentpen, + real xMin=borne-3, real xMax=borne+3, + ticks ticks=Ticks(), + bool solutions=true, + bool hach=true) +{ +// Tracé de l'axe // Possibilité de changer le repérage dans Ticks() + xlimits(pic,min=xMin,max=xMax); + xaxis(pic,Label("$x$",align=N),ticks,Arrow); +// Crochet + bracket(pic, a, borne, position, brack, 1.5bp+solcolor); +// Solutions en couleur + if (dirsol==0){extrem=xMin; + bornebis=xMax;} + else {extrem=xMax; + bornebis=xMin;} + draw(pic,(borne,0)--(extrem,0),1.5bp+solcolor); +// Écrire "solutions" + if (solutions){ + label(pic,Label("\scriptsize solutions",solcolor),((borne+extrem)/2,0),2*N);} +// Définition de la hachure + add("hach_cg",hatch(H=3mm,dir=NE,solcolor)); + if (hach){ + hatching(pic,borne,bornebis,"hach_cg");} +} + +// +// solonaxis(pic,a,borne,position,dirsol,brack,solcolor=currentpen, +// xMin=borne-3,xMax=borne+3,ticks=Ticks(), +// solutions=true,hach=true) + +//////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////// + +// Solutions d'inéquations +void sol2onaxis(picture pic=currentpicture, + string a1="", + real borne1, + pair pos1=N, + int dirsol1, + string bracket1, + pen solcolor1=currentpen, + string a2="", + real borne2, + pair pos2=N, + int dirsol2, + string bracket2, + pen solcolor2=currentpen, + real xMin=min(borne1,borne2)-2.5, real xMax=max(borne1,borne2)+2.5, + ticks ticks=Ticks(), + bool hach=true) +{ +solonaxis(pic,a1,borne1,pos1,dirsol1,bracket1,solcolor1,xMin,xMax,ticks,solutions=false,hach); +// Crochet +bracket(pic,a2, borne2, pos2, bracket2, 1.5bp+solcolor2); +// Solutions en couleur + if (dirsol2==0){draw(pic,(borne2,0)--(xMin,0),1.5bp+solcolor2);} + else {draw(pic,(borne2,0)--(xMax,0),1.5bp+solcolor2);} +// Intervalle solution (solcolor=solcolor1+solcolor2) + if (dirsol1==0 && dirsol2==0){ + draw(pic,(min(borne1,borne2),0)--(xMin,0),(1.5bp+solcolor1+solcolor2)); + } + if (dirsol1!=0 && dirsol2!=0){ + draw(pic,(max(borne1,borne2),0)--(xMax,0),(1.5bp+solcolor1+solcolor2)); + } + if (borne1borne2){ + if (dirsol1==0 && dirsol2!=0){ + draw(pic,(borne2,0)--(borne1,0),(1.5bp+solcolor1+solcolor2)); + } + } +// Définition de la hachure + add("hachback_cg",hatch(H=3mm,dir=NW,solcolor2)); + real bornebis2; + if (hach){ + if (dirsol2==0){bornebis2=xMax;} + else {bornebis2=xMin;} + hatching(pic,borne2,bornebis2,"hachback_cg");} +} + +// +// sol2onaxis(pic,a1,borne1,pos1,dirsol1,bracket1,solcolor1=currentpen, +// a2,borne2,pos2,dirsol2,bracket2,solcolor2=currentpen, +// xMin=min(borne1,borne2)-2.5,xMax=max(borne1,borne2)+2.5, +// ticks=Ticks(),hach=true) + diff --git a/config.asy b/config.asy new file mode 100644 index 0000000..63c0e28 --- /dev/null +++ b/config.asy @@ -0,0 +1,3 @@ +import settings; +settings.outformat = "svg"; +//settings.tex = "pdflatex"; diff --git a/dc_stat.asy b/dc_stat.asy new file mode 100644 index 0000000..d5d1b0a --- /dev/null +++ b/dc_stat.asy @@ -0,0 +1,156 @@ +//DCstat-1 +//02/03/2009 + + +pen[] couleur={mediumred,mediumcyan,mediumgreen,mediummagenta,mediumblue,yellow, + orange,fuchsia,brown,heavycyan,heavygreen,heavymagenta,deepblue,white,black}; + +struct axes{pair min; pair max;real graduationx;real numerotationx;real taillex;real graduationy;real numerotationy;real tailley;} + +axes calculaxes(real[] xi,real[] ni,pair ptO=(0,0)){ + axes ax; + ax.min=ptO; + ax.max=(max(xi)*1.05,max(ni)*1.05); + + //axe des x + if (ax.max.x-ax.min.x<1){ax.graduationx=0.025;ax.numerotationx=0.1;} + else if (ax.max.x-ax.min.x<10){ax.graduationx=0.25;ax.numerotationx=1;} + else if (ax.max.x-ax.min.x<100){ax.graduationx=2.5;ax.numerotationx=10;} + else if (ax.max.x-ax.min.x<1000){ax.graduationx=25;ax.numerotationx=100;} + else if (ax.max.x-ax.min.x<10000){ax.graduationx=250;ax.numerotationx=1000;} + else {ax.graduationx=2500;ax.numerotationx=10000;} + + //données axe y + ax.tailley=0.0125*(ax.max.x-ax.min.x); + if (ax.max.y-ax.min.y<1){ax.graduationy=0.025;ax.numerotationy=0.1;} + else if (ax.max.y-ax.min.y<10){ax.graduationy=0.25;ax.numerotationy=1;} + else if (ax.max.y-ax.min.y<100){ax.graduationy=2.5;ax.numerotationy=10;} + else if (ax.max.y-ax.min.y<1000){ax.graduationy=25;ax.numerotationy=100;} + else if (ax.max.y-ax.min.y<10000){ax.graduationy=250;ax.numerotationy=1000;} + else {ax.graduationy=2500;ax.numerotationy=10000;} + + //retour axe des x + ax.taillex=0.0125*(ax.max.y-ax.min.y); + return ax;} + +void traceaxe(axes lesaxes,bool axedesy=true,bool origine=true,pair pointO=(0,0), string libellex,string libelley=""){ + //axe des abscisses + draw((lesaxes.min.x,pointO.y)--(lesaxes.max.x,pointO.y),Arrow(1.5mm)); + + //tracé des graduations + for (int n = round(lesaxes.min.x/lesaxes.graduationx) ; n <= (0.98*lesaxes.max.x)/lesaxes.graduationx; ++ n) { + draw((n*lesaxes.graduationx,pointO.y-0.5*lesaxes.taillex)--(n*lesaxes.graduationx,pointO.y+0.5*lesaxes.taillex));} + + //tracé des numérotations + for (int n = round(lesaxes.min.x/lesaxes.numerotationx) ; n <= (0.98*lesaxes.max.x)/lesaxes.numerotationx; ++ n) { + draw((n*lesaxes.numerotationx,pointO.y-lesaxes.taillex)--(n*lesaxes.numerotationx,pointO.y+lesaxes.taillex)); + if(origine){label(scale(0.6)*format(n*lesaxes.numerotationx),(n*lesaxes.numerotationx,pointO.y-lesaxes.taillex),S);} + else {if(n!=0){label(scale(0.6)*format(n*lesaxes.numerotationx),(n*lesaxes.numerotationx,pointO.y-lesaxes.taillex),S);}}} + + //Nom de l'axe + label(scale(0.9)*libellex,(lesaxes.max.x,pointO.y-5*lesaxes.taillex),SW); + + //axe des ordonnées + if (axedesy) {draw((pointO.x,lesaxes.min.y)--(pointO.x,lesaxes.max.y),Arrow(1.5mm)); + + //tracé des graduations + for (int n = round(lesaxes.min.y/lesaxes.graduationy) ; n <= (0.98*lesaxes.max.y)/lesaxes.graduationy; ++ n) { + draw((pointO.x-0.5*lesaxes.tailley,n*lesaxes.graduationy)--(pointO.x+0.5*lesaxes.tailley,n*lesaxes.graduationy));} + + //tracé des numérotations + for (int n = round(lesaxes.min.y/lesaxes.numerotationy) ; n <= (0.98*lesaxes.max.y)/lesaxes.numerotationy; ++ n) { + draw((pointO.x-lesaxes.tailley,n*lesaxes.numerotationy)--(pointO.x+lesaxes.tailley,n*lesaxes.numerotationy)); + label(scale(0.6)*format(n*lesaxes.numerotationy),(pointO.x-lesaxes.tailley,n*lesaxes.numerotationy),W);} + + //Nom de l'axe + label(scale(0.9)*rotate(90)*libelley,(pointO.x-(log10(lesaxes.max.y)+3)*1.5*lesaxes.tailley,lesaxes.max.y),SW);} +} + +void diagramme_baton(real[] xi,real[] ni,pen p1=0.5bp+blue,pair origine=(0,0),bool affichey=true,string nomdesx,string nomdesy="Effectif"){ + +real largeur=0.1; +real hauteur=0; +for(int i=0; i < ni.length;++i){hauteur=hauteur+xi[i]; + filldraw(((xi[i]-largeur),origine.y)--((xi[i]-largeur),ni[i])--((xi[i]+largeur),ni[i])--((xi[i]+largeur),origine.y)--cycle,p1);} + +traceaxe(calculaxes(xi,ni,origine),origine,nomdesx,nomdesy); +} + + +void diagramme_barre(string[] modalite,real[] ni,pen p1=0.5bp+blue,pair origine=(0,0),bool affichey=true,string nomdesy="Effectif"){ + +//tracé des axes +real[] tbxi; +for (int i=0;iabs(tabxi[i+1]-tabxi[i])) {largeurunite=abs(tabxi[i+1]-tabxi[i]);iclasse=i;}} + + // Hauteur du rectangle le plus haut pour placer l'unité au dessus. + real hauteurmaxi=max(tabhi); + + // Calcul de la hauteur à donner au rectangle unité d'aire + real hauteurunite=(uniteaire/tabni[iclasse])*tabhi[iclasse]; + + //tracé des axes + axes ax=calculaxes(tabxi,tabhi,origine); + traceaxe(ax,axedesy,true,origine,libellecaractere,"hauteurs"); + + // Hauteur du rectangle le plus haut pour placer l'unité au dessus. + real hauteurmaxi=max(tabhi); + + // Calcul de la hauteur à donner au rectangle unité d'aire + real hauteurunite=(uniteaire/tabni[iclasse])*tabhi[iclasse]; + + // Tracé de l'histogramme + for (int i=0; i < tabhi.length;++i){ + //tracé d'un rectangle + filldraw(box((tabxi[i],origine.y),(tabxi[i+1],tabhi[i])),p1); + draw((tabxi[i],origine.y)--(tabxi[i],tabhi[i])--(tabxi[i+1],tabhi[i])--(tabxi[i+1],origine.y),p2);} + + // Tracé de l'unité d'aire et son étiquette + if (unitedaire) {filldraw(box((0.05*ax.max.x,1.1*hauteurmaxi),(0.05*ax.max.x+largeurunite,1.1*hauteurmaxi+hauteurunite)),p1,p2); + label(scale(0.8)*libelleunite,(0.05*ax.max.x+1.2*largeurunite,1.1*hauteurmaxi+0.5*hauteurunite),E);} + + +} + +void diagrammecirculaire(string[] tabmod,real[] tabeff,string nomdugraph=""){ + +real[] tabangle,tabanglecumule,tabanglelabel; +tabanglecumule[0]=0; +int n=tabeff.length; +for(int i=0; i=1) uniteaire=uniteaire/100; + uniteairetempo=uniteaire*sum(tabni); + } + if(frequence==true && pourcent==true) { + uniteairetempo=uniteaire*sum(tabni)/100; + } + // Une variable utile pour déterminer la plus petite amplitude : + real largeurunite=abs(tabxi[1]-tabxi[0]); + // ... et une autre pour le numéro de classe correspondant : + int iclasse=0; + // Calcul des hauteurs (et de la plus petite amplitude de classe) : + real[] tabhi; + for(int i=0; i < tabni.length; ++i){ + tabhi[i]=tabni[i]/(tabxi[i+1]-tabxi[i]); + if (largeurunite>abs(tabxi[i+1]-tabxi[i])) { + largeurunite=abs(tabxi[i+1]-tabxi[i]); + iclasse=i; + } + } + // Hauteur du rectangle le plus haut pour placer l'unité au dessus. + real hauteurmaxi=max(tabhi); + // Calcul de la hauteur à donner au rectangle unité d'aire + real hauteurunite=(uniteairetempo/tabni[iclasse])*tabhi[iclasse]; + + int nbrlignes = ceil(hauteurmaxi/hauteurunite); + for(int k=0; k<=nbrlignes; ++k){ + draw((minaxe,k*hauteurunite)--(maxaxe,k*hauteurunite),.5bp+gray); + } + for(int k=0; k<=((maxaxe-minaxe)/largeurunite); ++k){ + draw((minaxe+k*largeurunite,0)--(minaxe+k*largeurunite,nbrlignes*hauteurunite),.5bp+gray); + } + // Tracé de l'histogramme + histogram(tabxi,tabhi,low=0,bars=bars,p1,p2); + // Tracé de l'unité d'aire et son étiquette + if(afficherUniteAire){ + filldraw(shift(truepoint(N+W))*box((0,0),(largeurunite,hauteurunite)),p1,p2); + if(valeurUniteAire) + label(libelleunite+(string) uniteaire+(pourcent==true ? "\%": ""),truepoint(N+W)+(largeurunite,-hauteurunite/2),E); + } + // Ajout de l'axe gradué + xaxis(libellecaractere, Bottom, minaxe,maxaxe, + RightTicks(Label(currentpen+fontsize(6)), + Step=uniteaxe),above=true); +} + +/////// bam et multibam pour des diagrammes en boite. + +void bam(real[] xi, real h=1, real dh=0, bool lab=true, real Step=1){ + xi=sort(xi); + real n=xi.length; + real xmin=min(xi), + q1= (floor(.25*n)==.25*n) ? xi[floor(.25*n)-1] : xi[floor(.25*n)], + me= (n%2==0) ? (xi[floor(n/2)-1]+xi[floor(n/2)])/2 : xi[floor((n+1)/2)-1], + q3= (floor(.75*n)==.75*n) ? xi[floor(.75*n)-1] : xi[floor(.75*n)], + xmax=max(xi); + xaxis(xmin,xmax,Ticks(Step=Step,Size=2)); + draw(box((q1,1+dh),(q3,1+dh+h))); + draw((me,1+dh)--(me,1+dh+h)); + real hm=(1+dh+1+dh+h)/2; + draw((xmin,hm)--(q1,hm)^^(q3,hm)--(xmax,hm)); + draw((xmin,hm-.1)--(xmin,hm+.1)^^(xmax,hm-.1)--(xmax,hm+.1)); + draw((xmin,0)--(xmin,hm)^^(q1,0)--(q1,hm)^^(me,0)--(me,hm)^^(q3,0)--(q3,hm) + ^^(xmax,0)--(xmax,hm),linetype("4 4")); + if(lab){ + label("$X_{min}$",(xmin,hm),S,UnFill()); + label("$Q_1$",(q1,hm-h/2),S,UnFill()); + label("$M$",(me,hm-h/2),S,UnFill()); + label("$Q_3$",(q3,hm-h/2),S,UnFill()); + label("$X_{max}$",(xmax,hm),S,UnFill()); + } +} + +picture bam0(real[] xi, real larg=1, + bool comment_b=false, + bool titre_b =false, + Label titre_l ="", + pair titre_pos=max(xi), + align titre_dir=NoAlign, + pen stylo=currentpen, pen backgr=nullpen + ){ + picture pic; + xi=sort(xi); + real n=xi.length; + real xmin=min(xi), + q1= (floor(.25*n)==.25*n) ? xi[floor(.25*n)-1] : xi[floor(.25*n)], + me= (n%2==0) ? (xi[floor(n/2)-1]+xi[floor(n/2)])/2 : xi[floor((n+1)/2)-1], + q3= (floor(.75*n)==.75*n) ? xi[floor(.75*n)-1] : xi[floor(.75*n)], + xmax=max(xi); + filldraw(pic,box((q1,-larg/2),(q3,larg/2)),backgr,stylo); + draw(pic,(me,-larg/2)--(me,larg/2),stylo); + draw(pic,(xmin,0)--(q1,0)^^(q3,0)--(xmax,0),stylo); + draw(pic,(xmin,-.1)--(xmin,.1)^^(xmax,-.1)--(xmax,.1),stylo); + if(titre_b) label(pic,titre_l,titre_pos,titre_dir); + if(comment_b){ + label(pic,"$X_{min}$",(xmin,0),S,UnFill()); + label(pic,"$Q_1$",(q1,-larg/2),S,UnFill()); + label(pic,"$M$",(me,-larg/2),S,UnFill()); + label(pic,"$Q_3$",(q3,-larg/2),S,UnFill()); + label(pic,"$X_{max}$",(xmax,0),S,UnFill()); + } + return pic; +} + +void multibam(picture pic=currentpicture, + real[][] ij, + real[] larg =new real[], + real[] esp =new real[], + bool tit_b =false, + Label[] tit =new Label[], + align[] tit_d =new align[], + pen[] sty =new pen[], + pen[] bkg =new pen[], + real Step=0, real step=0, real xmargin=0, + bool vertical=false, + bool twoaxis=false){ + picture pict; + int n=ij.length; + if(larg.length==0)larg.push(1); + if(esp.length==0) esp.push(.5); + while(larg.lengthabs(vAB.y))? ((abs(vAB.y)>abs(vAB.z))?Z:Y) : ((abs(vAB.x)>abs(vAB.z))?Z:X); + transform3 Tp=shift(offset*v); + pic.add(new void(picture f, transform3 t) { + picture opic; + path3 G=Tp*t*g; + Label L=L.copy(); + draw(opic,L,G,p,arrow); + triple Ap=t*A, Bp=t*B; + draw(opic,(Ap--Tp*Ap)^^(Bp--Tp*Bp), joinpen); + add(f,opic); + }, true); +} \ No newline at end of file diff --git a/gm_probabilitytree.asy b/gm_probabilitytree.asy new file mode 100644 index 0000000..8a202ac --- /dev/null +++ b/gm_probabilitytree.asy @@ -0,0 +1,147 @@ +/* + AVERTISSEMENT du 05/02/11 : + après près de deux ans d'utilisation, je songe à revopir + en profondeur cette extension(ette) pour en faire + une vraie extension avec davantage de possibilités. + Tout est susceptible de changer ! +*/ + +// probabilitytree.asy - v. 1.1 - 19/04/09 +// Extension destinée à dessiner un arbre de probabilités +// C'est une première version, non documentée, en phase de test. +// G. Marris + +real DistVertEntreNoeuds = .5cm; +real DistHoriEntreNiveaux = 2cm; +real HauteurNoeudMinimale = .5cm; +pen StyleEvenParDefaut = 1bp+black; +pen StyleBackGrParDefaut = invisible; +pen StyleProbParDefaut = black; +pen StyleBrParDefaut = black; + +struct Noeud {Noeud parent; + Noeud[] enfants; + Label evenement; + Label probabilite; + pen coul_pr; + pen coul_br; + pair lieu; + frame cadre; + real decalage_y; +} + +Noeud addN( Noeud parent = null, + Label evenement = "", + pen[] evpen={StyleEvenParDefaut,StyleBackGrParDefaut}, + Label probabilite = null, + pen prpen=StyleProbParDefaut, + pen brpen=StyleBrParDefaut) +{ + frame fr; + Noeud nouvelenfant = new Noeud; + if (evpen.length==1) evpen[1]=StyleBackGrParDefaut; + label(fr,evenement,evpen[0]); + roundbox(fr, + xmargin=1mm, + Fill(evpen[1])); + nouvelenfant.cadre = fr; + nouvelenfant.probabilite = probabilite; + nouvelenfant.coul_pr = prpen; + nouvelenfant.coul_br = brpen; + if( parent != null ) { + nouvelenfant.parent = parent; + parent.enfants.push( nouvelenfant ); + } + return nouvelenfant; +} + +real CalculHauteur( int niveau, Noeud noeud ) +{ + real hauteurcadrenoeud=(max(noeud.cadre)-min(noeud.cadre)).y; + if( noeud.enfants.length > 0 ) { + real hauteur[] = new real[noeud.enfants.length]; + real H = 0; + + for( int i = 0; i < noeud.enfants.length; ++i ) { + hauteur[i] = CalculHauteur(niveau+1, noeud.enfants[i] ); + noeud.enfants[i].lieu =(niveau*DistHoriEntreNiveaux, H-hauteur[i]/2); + H -= hauteur[i]+DistVertEntreNoeuds; + } + real hauteurramifications = (sum(hauteur) + +DistVertEntreNoeuds*(hauteur.length-1)); + for( int i = 0; i < noeud.enfants.length; ++i ) { + noeud.enfants[i].decalage_y = hauteurramifications/2; + } + return max(hauteurcadrenoeud,sum(hauteur) + +DistVertEntreNoeuds*(hauteur.length-1)); + } + else { + return max(hauteurcadrenoeud,HauteurNoeudMinimale); + } +} +void TracerRecursivement( Noeud noeud, frame f ) +{ + pair pos; + if( noeud.parent != null ) + pos = (0, noeud.parent.lieu.y + noeud.decalage_y); + else + pos = (0, noeud.decalage_y); + noeud.lieu += pos; + + noeud.cadre = shift(noeud.lieu)*noeud.cadre; + + if( noeud.parent != null ) { + pair dirtrait=noeud.parent.lieu-noeud.lieu; + path p = point(noeud.cadre,dirtrait)--point(noeud.parent.cadre,E); + draw(f,p,noeud.coul_br); + if( noeud.probabilite != null ) { + label(f,scale(.9)*noeud.probabilite, + relpoint(p,.3),noeud.coul_pr,Fill(1,white)); + } + } + + add( f, noeud.cadre ); + + for( int i = 0; i < noeud.enfants.length; ++i ) + TracerRecursivement( noeud.enfants[i], f ); +} +void TracerArbre( Noeud racine, pair pos=(0,0) ) +{ + frame f; + racine.lieu = (0,0); + CalculHauteur( 1, racine ); + TracerRecursivement( racine, f ); + add(f,pos); +} +void Bernouilli( Label Succes="$S$", Label probS="$p$", + Label Echec="$\overline{S}$", Label probE="$q$", + int repet=2, pair pos=(0,0) ) +{ + int n = 2^repet-1, j; + Noeud[] N; + N[0] = addN( ); + for (int i=1; i<=2*n; i+=2) { + j=floor((i-1)/2); + N[i] = addN( N[j], Succes, probS ); + N[i+1] = addN( N[j], Echec, probE ); + } + TracerArbre( N[0], pos ); +} +void GagnerAToutPrix( Label Succes="$G$", Label probS="$\frac{1}{2}$", + Label Echec="$P$", Label probE="$\frac{1}{2}$", + int repet=4, pair pos=(0,0) ) +{ + int n = 2*repet; + Noeud[] N; + N[0] = addN( ); + for (int i=0; i<=repet; ++i) { + N[2*i+1] = addN( N[2*i], Succes, probS ); + N[2*i+2] = addN( N[2*i], Echec, probE ); + } + TracerArbre( N[0], pos ); +} + +pair operator cast(Noeud P) +{ + return P.lieu; +} diff --git a/gm_tableaux.asy b/gm_tableaux.asy new file mode 100644 index 0000000..99aedb3 --- /dev/null +++ b/gm_tableaux.asy @@ -0,0 +1,157 @@ +// Un début de quelque chose qui pourrait être une extension, un jour, +// pour tracer des tableaux de signes et/ou variations. + +// MAIS, il y a un grand MAIS : si je devais me lancer vraiment +// là dedans... tout serait à repenser pour donner la souplesse +// nécessaire à l'ajout de nouvelles possibilités. + +import fontsize; + +restricted bool cr=true; +restricted bool decr=false; + +picture tabvar(string var="x", + string fonct="f", + string deriv="f'(x)", + string[] lx, + string[] ly, + bool3 psv=default, + real[] v={0,1}, + bool affderivee=false, + string[] ld={" "}, + bool m=true, + real x1=1.2, + real x2=2.5, + real y1=1, + real y2=2, + pen styletrait=1bp+black, + pen stylefleche=styletrait) { + picture pic; + real fx(real x) {return 3/2*x1+x*x2;} + real l=x1/20; + string d=(m==true)?"$":""; + int n=lx.length-1; + while (ly.length0)?v.push(0):v.push(1); + while (v.length-1) { + draw(pic,(fx(i)-l,-y1+delta)--(fx(i)-l,-2*y1+delta-y2)^^(fx(i)+l,-y1+delta)--(fx(i)+l,-2*y1+delta-y2),styletrait); + string[] lim; + lim=split(ly[i],"VI"); + int zu=1; if(i==0) zu=0; + if(i!=0) { + im.push(draw(pic,Label(d+((m==true)?replace(lim[0],"inf","\infty"):lim[0])+d,align=W),box,(fx(i),vn[i+decal]),invisible)); + relier.push(false); + } + if(i!=n) { + im.push(draw(pic,Label(d+((m==true)?replace(lim[1],"inf","\infty"):lim[1])+d,align=E),box,(fx(i),vn[i+decal+zu]),invisible)); + relier.push(true); + } + if(i!=0&&i!=n) { + ++decal; + vn.push(vn[vn.length-2]); + } + } + else { + im.push(draw(pic,d+((m==true)?replace(ly[i],"inf","\infty"):ly[i])+d,box,(fx(i),vn[i+decal]),invisible)); + relier.push(true); + } + } + add(pic,new void(picture pic2, transform t) { + for(int i=0; i-1;--i){ + int d1=(int)distsort[i][1]; + int d2=(int)distsort[i][2]; + triple u,v,w; + u=point(join[d1],0)-cofgr(join[d1]); + v=point(join[d1],1)-cofgr(join[d1]); + w=unit(cross(u,v)); + if(dot(w,cam-cofgr(join[d1]))<0) w=-w; + real contrast=0.5*(dot(sum(lt.position),w)+1); + if(lt==nolight) contrast=1; + filldraw(pic,project(join[d1],P),contrast*fcol[d2]+opacity(op),dcol[d2]); + } + } else { + for (int i=0; i < pol.length; ++i) { + draw(pol[i],dcol[i]); + draw(polsurface(pol[i]),fcol[i]+opacity(op)); + } + } +} + +// Cube +polyhedron cube; +cube[0]=(-0.5,-0.5,0)--(0.5,-0.5,0)--(0.5,0.5,0)--(-0.5,0.5,0)--cycle; +cube[1]=(-0.5,-0.5,0)--(0.5,-0.5,0)--(0.5,-0.5,1)--(-0.5,-0.5,1)--cycle; +cube[2]=(0.5,-0.5,0)--(0.5,0.5,0)--(0.5,0.5,1)--(0.5,-0.5,1)--cycle; +cube[3]=(0.5,0.5,0)--(-0.5,0.5,0)--(-0.5,0.5,1)--(0.5,0.5,1)--cycle; +cube[4]=(-0.5,0.5,0)--(-0.5,-0.5,0)--(-0.5,-0.5,1)--(-0.5,0.5,1)--cycle; +cube[5]=(-0.5,-0.5,1)--(0.5,-0.5,1)--(0.5,0.5,1)--(-0.5,0.5,1)--cycle; + +// Adjust data such that the center is the triple (0,0,0) and such that the circumscribed ball has radius 1 +cube=shift(-0.5Z)*cube; +cube=scale3(1/abs(point(cube[0],0)))*cube; + +// Tetrahedron +polyhedron tetrahedron; +guide triangle=polygon(3); +tetrahedron[0]=(point(triangle,0).x,point(triangle,0).y,0); +for(int i=1;i<3;++i) tetrahedron[0]=tetrahedron[0]--(point(triangle,i).x,point(triangle,i).y,0); +tetrahedron[0]=tetrahedron[0]--cycle; +triple sp=(0,0,sqrt(2/3)*abs(point(triangle,1)-point(triangle,0))); +tetrahedron[1]=sp--point(tetrahedron[0],0)--point(tetrahedron[0],1)--cycle; +tetrahedron[2]=sp--point(tetrahedron[0],1)--point(tetrahedron[0],2)--cycle; +tetrahedron[3]=sp--point(tetrahedron[0],2)--point(tetrahedron[0],3)--cycle; +// Adjust data such that the center is the triple (0,0,0) and such that the circumscribed ball has radius 1 +triple cotetr; // center of gravity of the tetrahedron +for(int i=0;i<4;++i) cotetr=cotetr+cofgr(tetrahedron[i]); +cotetr=(1/4)*cotetr; +tetrahedron=shift(-cotetr.z*Z)*tetrahedron; +tetrahedron=scale3(1/abs(point(tetrahedron[0],0)))*tetrahedron; + +// Octahedron +polyhedron octahedron; +// The vertices of the octahedron are the midpoints of the faces of the cube +triple[] vert; for(int i=0;i<6;++i) vert[i]=cofgr(cube[i]); +octahedron[0]=vert[0]--vert[1]--vert[2]--cycle; +octahedron[1]=vert[0]--vert[2]--vert[3]--cycle; +octahedron[2]=vert[0]--vert[3]--vert[4]--cycle; +octahedron[3]=vert[0]--vert[4]--vert[1]--cycle; +octahedron[4]=vert[5]--vert[1]--vert[2]--cycle; +octahedron[5]=vert[5]--vert[2]--vert[3]--cycle; +octahedron[6]=vert[5]--vert[3]--vert[4]--cycle; +octahedron[7]=vert[5]--vert[4]--vert[1]--cycle; +// Adjust data such that the center is the triple (0,0,0) and such that the circumscribed ball has radius 1 +octahedron=scale3(1/abs(point(octahedron[0],0)))*octahedron; + +//#################################### +//Construction of icosahedron +polyhedron icosahedron; +real tau; +tau = (sqrt(5)+1)/2; +triple[] M; +M[0] = (0, tau, 1); M[1] = (0, -tau, 1); M[2] = (0, tau, -1); +M[3] = (0, -tau, -1); M[4] = (1, 0, tau); M[5] = (-1, 0, tau); +M[6] = (1, 0, -tau); M[7] = (-1, 0, -tau); M[8] = (tau, 1, 0); +M[9] = (-tau, 1, 0); M[10] = (tau, -1, 0); M[11] = (-tau, -1, 0); +guide3 triface_(int i, int j, int k){guide3 gh; gh=M[i-1]--M[j-1]--M[k-1]--cycle; return gh;}; +icosahedron[0]=triface_(1, 9, 3); +icosahedron[1]=triface_(1, 5, 9); +icosahedron[2]=triface_(1, 6, 5); +icosahedron[3]=triface_(1, 10, 6); +icosahedron[4]=triface_(1, 3, 10); +icosahedron[5]=triface_(3, 9, 7); +icosahedron[6]=triface_(9, 11, 7); +icosahedron[7]=triface_(9, 5, 11); +icosahedron[8]=triface_(5, 2, 11); +icosahedron[9]=triface_(5, 6, 2); +icosahedron[10]=triface_(6, 12, 2); +icosahedron[11]=triface_(6, 10, 12); +icosahedron[12]=triface_(10, 8, 12); +icosahedron[13]=triface_(10, 3, 8); +icosahedron[14]=triface_(3, 7, 8); +icosahedron[15]=triface_(4, 11, 2); +icosahedron[16]=triface_(4, 2, 12); +icosahedron[17]=triface_(4, 12, 8); +icosahedron[18]=triface_(4, 8, 7); +icosahedron[19]=triface_(4, 7, 11); + + +// Adjust data such that the center is the triple (0,0,0) and such that the circumscribed ball has radius 1 +triple cogricos; // center of gravity of the icosahedron + +for(int i=0;i<20;++i) cogricos=cogricos+cofgr(icosahedron[i]); +cogricos=(1/20)*cogricos; +icosahedron=shift(-cogricos.z*Z)*icosahedron; +icosahedron=scale3(1/abs(point(icosahedron[0],0)))*icosahedron; + +//Construction of a dodecahedron; +//######################################################## +polyhedron dodecahedron; +triple[] M_; +M_[0] = (1/3)*(M[0]+M[8]+M[2]); +M_[1] = (1/3)*(M[0]+M[4]+M[8]); +M_[2] = (1/3)*(M[0]+M[5]+M[4]); +M_[3] = (1/3)*(M[0]+M[9]+M[5]); +M_[4] = (1/3)*(M[0]+M[2]+M[9]); +M_[5] = (1/3)*(M[2]+M[8]+M[6]); +M_[6] = (1/3)*(M[8]+M[10]+M[6]); +M_[7] = (1/3)*(M[8]+M[4]+M[10]); +M_[8] = (1/3)*(M[4]+M[1]+M[10]); +M_[9] = (1/3)*(M[4]+M[5]+M[1]); +M_[10] = (1/3)*(M[5]+M[11]+M[1]); +M_[11] = (1/3)*(M[5]+M[9]+M[11]); +M_[12] = (1/3)*(M[9]+M[7]+M[11]); +M_[13] = (1/3)*(M[9]+M[2]+M[7]); +M_[14] = (1/3)*(M[2]+M[6]+M[7]); +M_[15] = (1/3)*(M[3]+M[10]+M[1]); +M_[16] = (1/3)*(M[3]+M[1]+M[11]); +M_[17] = (1/3)*(M[3]+M[11]+M[7]); +M_[18] = (1/3)*(M[3]+M[7]+M[6]); +M_[19] = (1/3)*(M[3]+M[6]+M[10]); +guide3 penface_(int i0, int i1, int i2, int i3, int i4){ + guide3 gh; gh=M_[i0-1]--M_[i1-1]--M_[i2-1]--M_[i3-1]--M_[i4-1]--cycle; return gh;}; +dodecahedron[0]=penface_(5, 4, 3, 2, 1); +dodecahedron[1]=penface_(1, 2, 8, 7, 6); +dodecahedron[2]=penface_(2, 3, 10, 9, 8); +dodecahedron[3]=penface_(3, 4, 12, 11, 10); +dodecahedron[4]=penface_(4, 5, 14, 13, 12); +dodecahedron[5]=penface_(5, 1, 6, 15, 14); +dodecahedron[6]=penface_(16, 17, 18, 19, 20); +dodecahedron[7]=penface_(16, 20, 7, 8, 9); +dodecahedron[8]=penface_(9, 10, 11, 17, 16); +dodecahedron[9]=penface_(11, 12, 13, 18, 17); +dodecahedron[10]=penface_(6, 7, 20, 19, 15); +dodecahedron[11]=penface_(13, 14, 15, 19, 18); +// Adjust data such that the center is the triple (0,0,0) and such that the circumscribed ball has radius 1 +dodecahedron=scale3(1/abs(point(dodecahedron[0],0)))*dodecahedron; + +//End of Construction of dodecahedron +//End of construction of platonian solids + +polyhedron truncTetraRight, cubooctahedron, +truncCube, truncOctahedron, +rhombiCuboocta, truncCuboocta, +snubCubeRight, snubCubeLeft, +icosDod, truncateDodeca, +truncIcos, rhombicosDodec, +snbDdcleft, snbDdcright, +greatRhombicosDodec; +//*** start of truncTetraRight *** +truncTetraRight[0]= + (-30.1511,-90.4534,-30.1511)-- + (30.1511,-90.4534,30.1511)-- + (30.1511,-30.1511,90.4534)-- + (-30.1511,30.1511,90.4534)-- + (-90.4534,30.1511,30.1511)-- + (-90.4534,-30.1511,-30.1511)-- + cycle; + +truncTetraRight[1]= + (-30.1511,-90.4534,-30.1511)-- + (30.1511,-90.4534,30.1511)-- + (90.4534,-30.1511,30.1511)-- + (90.4534,30.1511,-30.1511)-- + (30.1511,30.1511,-90.4534)-- + (-30.1511,-30.1511,-90.4534)-- + cycle; + +truncTetraRight[2]= + (30.1511,90.4534,-30.1511)-- + (-30.1511,90.4534,30.1511)-- + (-30.1511,30.1511,90.4534)-- + (30.1511,-30.1511,90.4534)-- + (90.4534,-30.1511,30.1511)-- + (90.4534,30.1511,-30.1511)-- + cycle; + +truncTetraRight[3]= + (30.1511,90.4534,-30.1511)-- + (-30.1511,90.4534,30.1511)-- + (-90.4534,30.1511,30.1511)-- + (-90.4534,-30.1511,-30.1511)-- + (-30.1511,-30.1511,-90.4534)-- + (30.1511,30.1511,-90.4534)-- + cycle; + +truncTetraRight[4]= + (-30.1511,-30.1511,-90.4534)-- + (-30.1511,-90.4534,-30.1511)-- + (-90.4534,-30.1511,-30.1511)-- + cycle; + +truncTetraRight[5]= + (30.1511,-30.1511,90.4534)-- + (30.1511,-90.4534,30.1511)-- + (90.4534,-30.1511,30.1511)-- + cycle; + +truncTetraRight[6]= + (30.1511,30.1511,-90.4534)-- + (30.1511,90.4534,-30.1511)-- + (90.4534,30.1511,-30.1511)-- + cycle; + +truncTetraRight[7]= + (-30.1511,30.1511,90.4534)-- + (-30.1511,90.4534,30.1511)-- + (-90.4534,30.1511,30.1511)-- + cycle; +truncTetraRight=scale3(1/abs(point(truncTetraRight[0],0)))*truncTetraRight; +//*** end of truncTetraRight *** + +//*** start of cubooctahedron *** +cubooctahedron[0]= + (70.7107,0,-70.7107)-- + (70.7107,-70.7107,0)-- + (70.7107,0,70.7107)-- + (70.7107,70.7107,0)-- + cycle; + +cubooctahedron[1]= + (-70.7107,-70.7107,0)-- + (-70.7107,0,70.7107)-- + (-70.7107,70.7107,0)-- + (-70.7107,0,-70.7107)-- + cycle; + +cubooctahedron[2]= + (0,70.7107,-70.7107)-- + (-70.7107,0,-70.7107)-- + (0,-70.7107,-70.7107)-- + (70.7107,0,-70.7107)-- + cycle; + +cubooctahedron[3]= + (-70.7107,0,70.7107)-- + (0,-70.7107,70.7107)-- + (70.7107,0,70.7107)-- + (0,70.7107,70.7107)-- + cycle; + +cubooctahedron[4]= + (70.7107,70.7107,0)-- + (0,70.7107,70.7107)-- + (-70.7107,70.7107,0)-- + (0,70.7107,-70.7107)-- + cycle; + +cubooctahedron[5]= + (0,-70.7107,70.7107)-- + (-70.7107,-70.7107,0)-- + (0,-70.7107,-70.7107)-- + (70.7107,-70.7107,0)-- + cycle; + +cubooctahedron[6]= + (70.7107,0,-70.7107)-- + (0,70.7107,-70.7107)-- + (70.7107,70.7107,0)-- + cycle; + +cubooctahedron[7]= + (70.7107,0,70.7107)-- + (70.7107,70.7107,0)-- + (0,70.7107,70.7107)-- + cycle; + +cubooctahedron[8]= + (0,70.7107,70.7107)-- + (-70.7107,0,70.7107)-- + (-70.7107,70.7107,0)-- + cycle; + +cubooctahedron[9]= + (-70.7107,70.7107,0)-- + (-70.7107,0,-70.7107)-- + (0,70.7107,-70.7107)-- + cycle; + +cubooctahedron[10]= + (-70.7107,-70.7107,0)-- + (-70.7107,0,70.7107)-- + (0,-70.7107,70.7107)-- + cycle; + +cubooctahedron[11]= + (-70.7107,0,-70.7107)-- + (0,-70.7107,-70.7107)-- + (-70.7107,-70.7107,0)-- + cycle; + +cubooctahedron[12]= + (70.7107,0,-70.7107)-- + (70.7107,-70.7107,0)-- + (0,-70.7107,-70.7107)-- + cycle; + +cubooctahedron[13]= + (0,-70.7107,70.7107)-- + (70.7107,0,70.7107)-- + (70.7107,-70.7107,0)-- + cycle; +cubooctahedron=scale3(1/abs(point(cubooctahedron[0],0)))*cubooctahedron; + +//*** end of cubooctahedron *** + +//*** start of truncCube *** +truncCube[0]= + (67.8598,-28.1085,-67.8598)-- + (67.8598,28.1085,-67.8598)-- + (67.8598,67.8598,-28.1085)-- + (67.8598,67.8598,28.1085)-- + (67.8598,28.1085,67.8598)-- + (67.8598,-28.1085,67.8598)-- + (67.8598,-67.8598,28.1085)-- + (67.8598,-67.8598,-28.1085)-- + cycle; + +truncCube[1]= + (-67.8598,-67.8598,28.1085)-- + (-67.8598,-67.8598,-28.1085)-- + (-67.8598,-28.1085,-67.8598)-- + (-67.8598,28.1085,-67.8598)-- + (-67.8598,67.8598,-28.1085)-- + (-67.8598,67.8598,28.1085)-- + (-67.8598,28.1085,67.8598)-- + (-67.8598,-28.1085,67.8598)-- + cycle; + +truncCube[2]= + (-28.1085,67.8598,-67.8598)-- + (28.1085,67.8598,-67.8598)-- + (67.8598,28.1085,-67.8598)-- + (67.8598,-28.1085,-67.8598)-- + (28.1085,-67.8598,-67.8598)-- + (-28.1085,-67.8598,-67.8598)-- + (-67.8598,-28.1085,-67.8598)-- + (-67.8598,28.1085,-67.8598)-- + cycle; + +truncCube[3]= + (-67.8598,-28.1085,67.8598)-- + (-67.8598,28.1085,67.8598)-- + (-28.1085,67.8598,67.8598)-- + (28.1085,67.8598,67.8598)-- + (67.8598,28.1085,67.8598)-- + (67.8598,-28.1085,67.8598)-- + (28.1085,-67.8598,67.8598)-- + (-28.1085,-67.8598,67.8598)-- + cycle; + +truncCube[4]= + (67.8598,67.8598,-28.1085)-- + (67.8598,67.8598,28.1085)-- + (28.1085,67.8598,67.8598)-- + (-28.1085,67.8598,67.8598)-- + (-67.8598,67.8598,28.1085)-- + (-67.8598,67.8598,-28.1085)-- + (-28.1085,67.8598,-67.8598)-- + (28.1085,67.8598,-67.8598)-- + cycle; + +truncCube[5]= + (28.1085,-67.8598,67.8598)-- + (-28.1085,-67.8598,67.8598)-- + (-67.8598,-67.8598,28.1085)-- + (-67.8598,-67.8598,-28.1085)-- + (-28.1085,-67.8598,-67.8598)-- + (28.1085,-67.8598,-67.8598)-- + (67.8598,-67.8598,-28.1085)-- + (67.8598,-67.8598,28.1085)-- + cycle; + +truncCube[6]= + (28.1085,67.8598,-67.8598)-- + (67.8598,28.1085,-67.8598)-- + (67.8598,67.8598,-28.1085)-- + cycle; + +truncCube[7]= + (67.8598,67.8598,28.1085)-- + (67.8598,28.1085,67.8598)-- + (28.1085,67.8598,67.8598)-- + cycle; + +truncCube[8]= + (-28.1085,67.8598,67.8598)-- + (-67.8598,28.1085,67.8598)-- + (-67.8598,67.8598,28.1085)-- + cycle; + +truncCube[9]= + (-67.8598,67.8598,-28.1085)-- + (-67.8598,28.1085,-67.8598)-- + (-28.1085,67.8598,-67.8598)-- + cycle; + +truncCube[10]= + (-67.8598,-67.8598,28.1085)-- + (-67.8598,-28.1085,67.8598)-- + (-28.1085,-67.8598,67.8598)-- + cycle; + +truncCube[11]= + (-28.1085,-67.8598,-67.8598)-- + (-67.8598,-28.1085,-67.8598)-- + (-67.8598,-67.8598,-28.1085)-- + cycle; + +truncCube[12]= + (67.8598,-67.8598,-28.1085)-- + (67.8598,-28.1085,-67.8598)-- + (28.1085,-67.8598,-67.8598)-- + cycle; + +truncCube[13]= + (28.1085,-67.8598,67.8598)-- + (67.8598,-28.1085,67.8598)-- + (67.8598,-67.8598,28.1085)-- + cycle; +truncCube=scale3(1/abs(point(truncCube[0],0)))*truncCube; + +//*** end of truncCube *** + +//*** start of truncOctahedron *** +truncOctahedron[0]= + (89.4427,0,-44.7214)-- + (89.4427,-44.7214,0)-- + (89.4427,0,44.7214)-- + (89.4427,44.7214,0)-- + cycle; + +truncOctahedron[1]= + (-89.4427,-44.7214,0)-- + (-89.4427,0,44.7214)-- + (-89.4427,44.7214,0)-- + (-89.4427,0,-44.7214)-- + cycle; + +truncOctahedron[2]= + (0,44.7214,-89.4427)-- + (-44.7214,0,-89.4427)-- + (0,-44.7214,-89.4427)-- + (44.7214,0,-89.4427)-- + cycle; + +truncOctahedron[3]= + (-44.7214,0,89.4427)-- + (0,-44.7214,89.4427)-- + (44.7214,0,89.4427)-- + (0,44.7214,89.4427)-- + cycle; + +truncOctahedron[4]= + (44.7214,89.4427,0)-- + (0,89.4427,44.7214)-- + (-44.7214,89.4427,0)-- + (0,89.4427,-44.7214)-- + cycle; + +truncOctahedron[5]= + (0,-89.4427,44.7214)-- + (-44.7214,-89.4427,0)-- + (0,-89.4427,-44.7214)-- + (44.7214,-89.4427,0)-- + cycle; + +truncOctahedron[6]= + (0,89.4427,-44.7214)-- + (0,44.7214,-89.4427)-- + (44.7214,0,-89.4427)-- + (89.4427,0,-44.7214)-- + (89.4427,44.7214,0)-- + (44.7214,89.4427,0)-- + cycle; + +truncOctahedron[7]= + (44.7214,89.4427,0)-- + (89.4427,44.7214,0)-- + (89.4427,0,44.7214)-- + (44.7214,0,89.4427)-- + (0,44.7214,89.4427)-- + (0,89.4427,44.7214)-- + cycle; + +truncOctahedron[8]= + (0,89.4427,44.7214)-- + (0,44.7214,89.4427)-- + (-44.7214,0,89.4427)-- + (-89.4427,0,44.7214)-- + (-89.4427,44.7214,0)-- + (-44.7214,89.4427,0)-- + cycle; + +truncOctahedron[9]= + (-44.7214,89.4427,0)-- + (-89.4427,44.7214,0)-- + (-89.4427,0,-44.7214)-- + (-44.7214,0,-89.4427)-- + (0,44.7214,-89.4427)-- + (0,89.4427,-44.7214)-- + cycle; + +truncOctahedron[10]= + (-44.7214,-89.4427,0)-- + (-89.4427,-44.7214,0)-- + (-89.4427,0,44.7214)-- + (-44.7214,0,89.4427)-- + (0,-44.7214,89.4427)-- + (0,-89.4427,44.7214)-- + cycle; + +truncOctahedron[11]= + (0,-89.4427,-44.7214)-- + (0,-44.7214,-89.4427)-- + (-44.7214,0,-89.4427)-- + (-89.4427,0,-44.7214)-- + (-89.4427,-44.7214,0)-- + (-44.7214,-89.4427,0)-- + cycle; + +truncOctahedron[12]= + (44.7214,-89.4427,0)-- + (89.4427,-44.7214,0)-- + (89.4427,0,-44.7214)-- + (44.7214,0,-89.4427)-- + (0,-44.7214,-89.4427)-- + (0,-89.4427,-44.7214)-- + cycle; + +truncOctahedron[13]= + (0,-89.4427,44.7214)-- + (0,-44.7214,89.4427)-- + (44.7214,0,89.4427)-- + (89.4427,0,44.7214)-- + (89.4427,-44.7214,0)-- + (44.7214,-89.4427,0)-- + cycle; +truncOctahedron=scale3(1/abs(point(truncOctahedron[0],0)))*truncOctahedron; + +//*** end of truncOctahedron *** + +//*** start of rhombiCuboocta *** +rhombiCuboocta[0]= + (86.2856,35.7407,-35.7407)-- + (86.2856,-35.7407,-35.7407)-- + (86.2856,-35.7407,35.7407)-- + (86.2856,35.7407,35.7407)-- + cycle; + +rhombiCuboocta[1]= + (-86.2856,-35.7407,-35.7407)-- + (-86.2856,-35.7407,35.7407)-- + (-86.2856,35.7407,35.7407)-- + (-86.2856,35.7407,-35.7407)-- + cycle; + +rhombiCuboocta[2]= + (35.7407,35.7407,-86.2856)-- + (-35.7407,35.7407,-86.2856)-- + (-35.7407,-35.7407,-86.2856)-- + (35.7407,-35.7407,-86.2856)-- + cycle; + +rhombiCuboocta[3]= + (-35.7407,35.7407,86.2856)-- + (-35.7407,-35.7407,86.2856)-- + (35.7407,-35.7407,86.2856)-- + (35.7407,35.7407,86.2856)-- + cycle; + +rhombiCuboocta[4]= + (35.7407,86.2856,-35.7407)-- + (35.7407,86.2856,35.7407)-- + (-35.7407,86.2856,35.7407)-- + (-35.7407,86.2856,-35.7407)-- + cycle; + +rhombiCuboocta[5]= + (35.7407,-86.2856,35.7407)-- + (-35.7407,-86.2856,35.7407)-- + (-35.7407,-86.2856,-35.7407)-- + (35.7407,-86.2856,-35.7407)-- + cycle; + +rhombiCuboocta[6]= + (35.7407,86.2856,-35.7407)-- + (35.7407,35.7407,-86.2856)-- + (86.2856,35.7407,-35.7407)-- + cycle; + +rhombiCuboocta[7]= + (35.7407,86.2856,35.7407)-- + (86.2856,35.7407,35.7407)-- + (35.7407,35.7407,86.2856)-- + cycle; + +rhombiCuboocta[8]= + (-35.7407,86.2856,35.7407)-- + (-35.7407,35.7407,86.2856)-- + (-86.2856,35.7407,35.7407)-- + cycle; + +rhombiCuboocta[9]= + (-35.7407,86.2856,-35.7407)-- + (-86.2856,35.7407,-35.7407)-- + (-35.7407,35.7407,-86.2856)-- + cycle; + +rhombiCuboocta[10]= + (-35.7407,-86.2856,35.7407)-- + (-86.2856,-35.7407,35.7407)-- + (-35.7407,-35.7407,86.2856)-- + cycle; + +rhombiCuboocta[11]= + (-35.7407,-86.2856,-35.7407)-- + (-35.7407,-35.7407,-86.2856)-- + (-86.2856,-35.7407,-35.7407)-- + cycle; + +rhombiCuboocta[12]= + (35.7407,-86.2856,-35.7407)-- + (86.2856,-35.7407,-35.7407)-- + (35.7407,-35.7407,-86.2856)-- + cycle; + +rhombiCuboocta[13]= + (35.7407,-86.2856,35.7407)-- + (35.7407,-35.7407,86.2856)-- + (86.2856,-35.7407,35.7407)-- + cycle; + +rhombiCuboocta[14]= + (86.2856,-35.7407,-35.7407)-- + (35.7407,-35.7407,-86.2856)-- + (35.7407,35.7407,-86.2856)-- + (86.2856,35.7407,-35.7407)-- + cycle; + +rhombiCuboocta[15]= + (35.7407,-35.7407,86.2856)-- + (86.2856,-35.7407,35.7407)-- + (86.2856,35.7407,35.7407)-- + (35.7407,35.7407,86.2856)-- + cycle; + +rhombiCuboocta[16]= + (-86.2856,-35.7407,35.7407)-- + (-35.7407,-35.7407,86.2856)-- + (-35.7407,35.7407,86.2856)-- + (-86.2856,35.7407,35.7407)-- + cycle; + +rhombiCuboocta[17]= + (-35.7407,-35.7407,-86.2856)-- + (-86.2856,-35.7407,-35.7407)-- + (-86.2856,35.7407,-35.7407)-- + (-35.7407,35.7407,-86.2856)-- + cycle; + +rhombiCuboocta[18]= + (86.2856,35.7407,-35.7407)-- + (35.7407,86.2856,-35.7407)-- + (35.7407,86.2856,35.7407)-- + (86.2856,35.7407,35.7407)-- + cycle; + +rhombiCuboocta[19]= + (35.7407,35.7407,86.2856)-- + (35.7407,86.2856,35.7407)-- + (-35.7407,86.2856,35.7407)-- + (-35.7407,35.7407,86.2856)-- + cycle; + +rhombiCuboocta[20]= + (-86.2856,35.7407,35.7407)-- + (-35.7407,86.2856,35.7407)-- + (-35.7407,86.2856,-35.7407)-- + (-86.2856,35.7407,-35.7407)-- + cycle; + +rhombiCuboocta[21]= + (-35.7407,35.7407,-86.2856)-- + (-35.7407,86.2856,-35.7407)-- + (35.7407,86.2856,-35.7407)-- + (35.7407,35.7407,-86.2856)-- + cycle; + +rhombiCuboocta[22]= + (-86.2856,-35.7407,-35.7407)-- + (-35.7407,-86.2856,-35.7407)-- + (-35.7407,-86.2856,35.7407)-- + (-86.2856,-35.7407,35.7407)-- + cycle; + +rhombiCuboocta[23]= + (35.7407,-35.7407,-86.2856)-- + (35.7407,-86.2856,-35.7407)-- + (-35.7407,-86.2856,-35.7407)-- + (-35.7407,-35.7407,-86.2856)-- + cycle; + +rhombiCuboocta[24]= + (86.2856,-35.7407,35.7407)-- + (35.7407,-86.2856,35.7407)-- + (35.7407,-86.2856,-35.7407)-- + (86.2856,-35.7407,-35.7407)-- + cycle; + +rhombiCuboocta[25]= + (-35.7407,-35.7407,86.2856)-- + (-35.7407,-86.2856,35.7407)-- + (35.7407,-86.2856,35.7407)-- + (35.7407,-35.7407,86.2856)-- + cycle; +rhombiCuboocta=scale3(1/abs(point(rhombiCuboocta[0],0)))*rhombiCuboocta; + +//*** end of rhombiCuboocta *** + +//*** start of truncCuboocta *** +truncCuboocta[0]= + (82.5943,21.5739,-52.0841)-- + (82.5943,-21.5739,-52.0841)-- + (82.5943,-52.0841,-21.5739)-- + (82.5943,-52.0841,21.5739)-- + (82.5943,-21.5739,52.0841)-- + (82.5943,21.5739,52.0841)-- + (82.5943,52.0841,21.5739)-- + (82.5943,52.0841,-21.5739)-- + cycle; + +truncCuboocta[1]= + (-82.5943,-52.0841,21.5739)-- + (-82.5943,-21.5739,52.0841)-- + (-82.5943,21.5739,52.0841)-- + (-82.5943,52.0841,21.5739)-- + (-82.5943,52.0841,-21.5739)-- + (-82.5943,21.5739,-52.0841)-- + (-82.5943,-21.5739,-52.0841)-- + (-82.5943,-52.0841,-21.5739)-- + cycle; + +truncCuboocta[2]= + (21.5739,52.0841,-82.5943)-- + (-21.5739,52.0841,-82.5943)-- + (-52.0841,21.5739,-82.5943)-- + (-52.0841,-21.5739,-82.5943)-- + (-21.5739,-52.0841,-82.5943)-- + (21.5739,-52.0841,-82.5943)-- + (52.0841,-21.5739,-82.5943)-- + (52.0841,21.5739,-82.5943)-- + cycle; + +truncCuboocta[3]= + (-52.0841,-21.5739,82.5943)-- + (-21.5739,-52.0841,82.5943)-- + (21.5739,-52.0841,82.5943)-- + (52.0841,-21.5739,82.5943)-- + (52.0841,21.5739,82.5943)-- + (21.5739,52.0841,82.5943)-- + (-21.5739,52.0841,82.5943)-- + (-52.0841,21.5739,82.5943)-- + cycle; + +truncCuboocta[4]= + (52.0841,82.5943,-21.5739)-- + (52.0841,82.5943,21.5739)-- + (21.5739,82.5943,52.0841)-- + (-21.5739,82.5943,52.0841)-- + (-52.0841,82.5943,21.5739)-- + (-52.0841,82.5943,-21.5739)-- + (-21.5739,82.5943,-52.0841)-- + (21.5739,82.5943,-52.0841)-- + cycle; + +truncCuboocta[5]= + (-21.5739,-82.5943,52.0841)-- + (-52.0841,-82.5943,21.5739)-- + (-52.0841,-82.5943,-21.5739)-- + (-21.5739,-82.5943,-52.0841)-- + (21.5739,-82.5943,-52.0841)-- + (52.0841,-82.5943,-21.5739)-- + (52.0841,-82.5943,21.5739)-- + (21.5739,-82.5943,52.0841)-- + cycle; + +truncCuboocta[6]= + (21.5739,52.0841,-82.5943)-- + (21.5739,82.5943,-52.0841)-- + (52.0841,82.5943,-21.5739)-- + (82.5943,52.0841,-21.5739)-- + (82.5943,21.5739,-52.0841)-- + (52.0841,21.5739,-82.5943)-- + cycle; + +truncCuboocta[7]= + (82.5943,52.0841,21.5739)-- + (52.0841,82.5943,21.5739)-- + (21.5739,82.5943,52.0841)-- + (21.5739,52.0841,82.5943)-- + (52.0841,21.5739,82.5943)-- + (82.5943,21.5739,52.0841)-- + cycle; + +truncCuboocta[8]= + (-21.5739,52.0841,82.5943)-- + (-21.5739,82.5943,52.0841)-- + (-52.0841,82.5943,21.5739)-- + (-82.5943,52.0841,21.5739)-- + (-82.5943,21.5739,52.0841)-- + (-52.0841,21.5739,82.5943)-- + cycle; + +truncCuboocta[9]= + (-82.5943,52.0841,-21.5739)-- + (-52.0841,82.5943,-21.5739)-- + (-21.5739,82.5943,-52.0841)-- + (-21.5739,52.0841,-82.5943)-- + (-52.0841,21.5739,-82.5943)-- + (-82.5943,21.5739,-52.0841)-- + cycle; + +truncCuboocta[10]= + (-82.5943,-52.0841,21.5739)-- + (-52.0841,-82.5943,21.5739)-- + (-21.5739,-82.5943,52.0841)-- + (-21.5739,-52.0841,82.5943)-- + (-52.0841,-21.5739,82.5943)-- + (-82.5943,-21.5739,52.0841)-- + cycle; + +truncCuboocta[11]= + (-21.5739,-52.0841,-82.5943)-- + (-21.5739,-82.5943,-52.0841)-- + (-52.0841,-82.5943,-21.5739)-- + (-82.5943,-52.0841,-21.5739)-- + (-82.5943,-21.5739,-52.0841)-- + (-52.0841,-21.5739,-82.5943)-- + cycle; + +truncCuboocta[12]= + (82.5943,-52.0841,-21.5739)-- + (52.0841,-82.5943,-21.5739)-- + (21.5739,-82.5943,-52.0841)-- + (21.5739,-52.0841,-82.5943)-- + (52.0841,-21.5739,-82.5943)-- + (82.5943,-21.5739,-52.0841)-- + cycle; + +truncCuboocta[13]= + (21.5739,-52.0841,82.5943)-- + (21.5739,-82.5943,52.0841)-- + (52.0841,-82.5943,21.5739)-- + (82.5943,-52.0841,21.5739)-- + (82.5943,-21.5739,52.0841)-- + (52.0841,-21.5739,82.5943)-- + cycle; + +truncCuboocta[14]= + (52.0841,-21.5739,-82.5943)-- + (82.5943,-21.5739,-52.0841)-- + (82.5943,21.5739,-52.0841)-- + (52.0841,21.5739,-82.5943)-- + cycle; + +truncCuboocta[15]= + (82.5943,-21.5739,52.0841)-- + (52.0841,-21.5739,82.5943)-- + (52.0841,21.5739,82.5943)-- + (82.5943,21.5739,52.0841)-- + cycle; + +truncCuboocta[16]= + (-52.0841,-21.5739,82.5943)-- + (-82.5943,-21.5739,52.0841)-- + (-82.5943,21.5739,52.0841)-- + (-52.0841,21.5739,82.5943)-- + cycle; + +truncCuboocta[17]= + (-82.5943,-21.5739,-52.0841)-- + (-52.0841,-21.5739,-82.5943)-- + (-52.0841,21.5739,-82.5943)-- + (-82.5943,21.5739,-52.0841)-- + cycle; + +truncCuboocta[18]= + (52.0841,82.5943,-21.5739)-- + (82.5943,52.0841,-21.5739)-- + (82.5943,52.0841,21.5739)-- + (52.0841,82.5943,21.5739)-- + cycle; + +truncCuboocta[19]= + (21.5739,82.5943,52.0841)-- + (21.5739,52.0841,82.5943)-- + (-21.5739,52.0841,82.5943)-- + (-21.5739,82.5943,52.0841)-- + cycle; + +truncCuboocta[20]= + (-52.0841,82.5943,21.5739)-- + (-82.5943,52.0841,21.5739)-- + (-82.5943,52.0841,-21.5739)-- + (-52.0841,82.5943,-21.5739)-- + cycle; + +truncCuboocta[21]= + (-21.5739,82.5943,-52.0841)-- + (-21.5739,52.0841,-82.5943)-- + (21.5739,52.0841,-82.5943)-- + (21.5739,82.5943,-52.0841)-- + cycle; + +truncCuboocta[22]= + (-52.0841,-82.5943,-21.5739)-- + (-82.5943,-52.0841,-21.5739)-- + (-82.5943,-52.0841,21.5739)-- + (-52.0841,-82.5943,21.5739)-- + cycle; + +truncCuboocta[23]= + (21.5739,-82.5943,-52.0841)-- + (21.5739,-52.0841,-82.5943)-- + (-21.5739,-52.0841,-82.5943)-- + (-21.5739,-82.5943,-52.0841)-- + cycle; + +truncCuboocta[24]= + (52.0841,-82.5943,21.5739)-- + (82.5943,-52.0841,21.5739)-- + (82.5943,-52.0841,-21.5739)-- + (52.0841,-82.5943,-21.5739)-- + cycle; + +truncCuboocta[25]= + (-21.5739,-82.5943,52.0841)-- + (-21.5739,-52.0841,82.5943)-- + (21.5739,-52.0841,82.5943)-- + (21.5739,-82.5943,52.0841)-- + cycle; +truncCuboocta=scale3(1/abs(point(truncCuboocta[0],0)))*truncCuboocta; + +//*** end of truncCuboocta *** + +//*** start of snubCubeRight *** +snubCubeRight[0]= + (-85.0284,-25.112,-46.2554)-- + (-85.0284,-46.2554,25.112)-- + (-85.0284,25.112,46.2554)-- + (-85.0284,46.2554,-25.112)-- + cycle; + +snubCubeRight[1]= + (85.0284,25.112,-46.2554)-- + (85.0284,-46.2554,-25.112)-- + (85.0284,-25.112,46.2554)-- + (85.0284,46.2554,25.112)-- + cycle; + +snubCubeRight[2]= + (-25.112,46.2554,85.0284)-- + (-46.2554,-25.112,85.0284)-- + (25.112,-46.2554,85.0284)-- + (46.2554,25.112,85.0284)-- + cycle; + +snubCubeRight[3]= + (25.112,46.2554,-85.0284)-- + (-46.2554,25.112,-85.0284)-- + (-25.112,-46.2554,-85.0284)-- + (46.2554,-25.112,-85.0284)-- + cycle; + +snubCubeRight[4]= + (46.2554,-85.0284,25.112)-- + (-25.112,-85.0284,46.2554)-- + (-46.2554,-85.0284,-25.112)-- + (25.112,-85.0284,-46.2554)-- + cycle; + +snubCubeRight[5]= + (46.2554,85.0284,-25.112)-- + (25.112,85.0284,46.2554)-- + (-46.2554,85.0284,25.112)-- + (-25.112,85.0284,-46.2554)-- + cycle; + +snubCubeRight[6]= + (-85.0284,-46.2554,25.112)-- + (-25.112,-85.0284,46.2554)-- + (-46.2554,-25.112,85.0284)-- + cycle; + +snubCubeRight[7]= + (-25.112,-46.2554,-85.0284)-- + (-46.2554,-85.0284,-25.112)-- + (-85.0284,-25.112,-46.2554)-- + cycle; + +snubCubeRight[8]= + (85.0284,-46.2554,-25.112)-- + (25.112,-85.0284,-46.2554)-- + (46.2554,-25.112,-85.0284)-- + cycle; + +snubCubeRight[9]= + (25.112,-46.2554,85.0284)-- + (46.2554,-85.0284,25.112)-- + (85.0284,-25.112,46.2554)-- + cycle; + +snubCubeRight[10]= + (25.112,46.2554,-85.0284)-- + (46.2554,85.0284,-25.112)-- + (85.0284,25.112,-46.2554)-- + cycle; + +snubCubeRight[11]= + (85.0284,46.2554,25.112)-- + (25.112,85.0284,46.2554)-- + (46.2554,25.112,85.0284)-- + cycle; + +snubCubeRight[12]= + (-25.112,46.2554,85.0284)-- + (-46.2554,85.0284,25.112)-- + (-85.0284,25.112,46.2554)-- + cycle; + +snubCubeRight[13]= + (-85.0284,46.2554,-25.112)-- + (-25.112,85.0284,-46.2554)-- + (-46.2554,25.112,-85.0284)-- + cycle; + +snubCubeRight[14]= + (-46.2554,-25.112,85.0284)-- + (-85.0284,-46.2554,25.112)-- + (-85.0284,25.112,46.2554)-- + cycle; + +snubCubeRight[15]= + (-85.0284,25.112,46.2554)-- + (-25.112,46.2554,85.0284)-- + (-46.2554,-25.112,85.0284)-- + cycle; + +snubCubeRight[16]= + (-85.0284,-25.112,-46.2554)-- + (-25.112,-46.2554,-85.0284)-- + (-46.2554,25.112,-85.0284)-- + cycle; + +snubCubeRight[17]= + (-46.2554,25.112,-85.0284)-- + (-85.0284,46.2554,-25.112)-- + (-85.0284,-25.112,-46.2554)-- + cycle; + +snubCubeRight[18]= + (46.2554,-25.112,-85.0284)-- + (85.0284,-46.2554,-25.112)-- + (85.0284,25.112,-46.2554)-- + cycle; + +snubCubeRight[19]= + (85.0284,25.112,-46.2554)-- + (25.112,46.2554,-85.0284)-- + (46.2554,-25.112,-85.0284)-- + cycle; + +snubCubeRight[20]= + (85.0284,-25.112,46.2554)-- + (25.112,-46.2554,85.0284)-- + (46.2554,25.112,85.0284)-- + cycle; + +snubCubeRight[21]= + (46.2554,25.112,85.0284)-- + (85.0284,46.2554,25.112)-- + (85.0284,-25.112,46.2554)-- + cycle; + +snubCubeRight[22]= + (-85.0284,-46.2554,25.112)-- + (-25.112,-85.0284,46.2554)-- + (-46.2554,-85.0284,-25.112)-- + cycle; + +snubCubeRight[23]= + (-46.2554,-85.0284,-25.112)-- + (-85.0284,-25.112,-46.2554)-- + (-85.0284,-46.2554,25.112)-- + cycle; + +snubCubeRight[24]= + (-25.112,-46.2554,-85.0284)-- + (-46.2554,-85.0284,-25.112)-- + (25.112,-85.0284,-46.2554)-- + cycle; + +snubCubeRight[25]= + (25.112,-85.0284,-46.2554)-- + (46.2554,-25.112,-85.0284)-- + (-25.112,-46.2554,-85.0284)-- + cycle; + +snubCubeRight[26]= + (85.0284,-46.2554,-25.112)-- + (25.112,-85.0284,-46.2554)-- + (46.2554,-85.0284,25.112)-- + cycle; + +snubCubeRight[27]= + (46.2554,-85.0284,25.112)-- + (85.0284,-25.112,46.2554)-- + (85.0284,-46.2554,-25.112)-- + cycle; + +snubCubeRight[28]= + (25.112,-46.2554,85.0284)-- + (46.2554,-85.0284,25.112)-- + (-25.112,-85.0284,46.2554)-- + cycle; + +snubCubeRight[29]= + (-25.112,-85.0284,46.2554)-- + (-46.2554,-25.112,85.0284)-- + (25.112,-46.2554,85.0284)-- + cycle; + +snubCubeRight[30]= + (85.0284,46.2554,25.112)-- + (25.112,85.0284,46.2554)-- + (46.2554,85.0284,-25.112)-- + cycle; + +snubCubeRight[31]= + (46.2554,85.0284,-25.112)-- + (85.0284,25.112,-46.2554)-- + (85.0284,46.2554,25.112)-- + cycle; + +snubCubeRight[32]= + (-25.112,46.2554,85.0284)-- + (-46.2554,85.0284,25.112)-- + (25.112,85.0284,46.2554)-- + cycle; + +snubCubeRight[33]= + (25.112,85.0284,46.2554)-- + (46.2554,25.112,85.0284)-- + (-25.112,46.2554,85.0284)-- + cycle; + +snubCubeRight[34]= + (-85.0284,46.2554,-25.112)-- + (-25.112,85.0284,-46.2554)-- + (-46.2554,85.0284,25.112)-- + cycle; + +snubCubeRight[35]= + (-46.2554,85.0284,25.112)-- + (-85.0284,25.112,46.2554)-- + (-85.0284,46.2554,-25.112)-- + cycle; + +snubCubeRight[36]= + (25.112,46.2554,-85.0284)-- + (46.2554,85.0284,-25.112)-- + (-25.112,85.0284,-46.2554)-- + cycle; + +snubCubeRight[37]= + (-25.112,85.0284,-46.2554)-- + (-46.2554,25.112,-85.0284)-- + (25.112,46.2554,-85.0284)-- + cycle; +snubCubeRight=scale3(1/abs(point(snubCubeRight[0],0)))*snubCubeRight; + +//*** end of snubCubeRight *** + +//*** start of snubCubeLeft *** +snubCubeLeft[0]= + (183.824,100,-54.2898)-- + (183.824,-54.2898,-100)-- + (183.824,-100,54.2898)-- + (183.824,54.2898,100)-- + cycle; + +snubCubeLeft[1]= + (-183.824,-100,-54.2898)-- + (-183.824,-54.2898,100)-- + (-183.824,100,54.2898)-- + (-183.824,54.2898,-100)-- + cycle; + +snubCubeLeft[2]= + (100,54.2898,-183.824)-- + (-54.2898,100,-183.824)-- + (-100,-54.2898,-183.824)-- + (54.2898,-100,-183.824)-- + cycle; + +snubCubeLeft[3]= + (-100,54.2898,183.824)-- + (-54.2898,-100,183.824)-- + (100,-54.2898,183.824)-- + (54.2898,100,183.824)-- + cycle; + +snubCubeLeft[4]= + (54.2898,183.824,-100)-- + (100,183.824,54.2898)-- + (-54.2898,183.824,100)-- + (-100,183.824,-54.2898)-- + cycle; + +snubCubeLeft[5]= + (54.2898,-183.824,100)-- + (-100,-183.824,54.2898)-- + (-54.2898,-183.824,-100)-- + (100,-183.824,-54.2898)-- + cycle; + +snubCubeLeft[6]= + (54.2898,183.824,-100)-- + (100,54.2898,-183.824)-- + (183.824,100,-54.2898)-- + cycle; + +snubCubeLeft[7]= + (100,183.824,54.2898)-- + (183.824,54.2898,100)-- + (54.2898,100,183.824)-- + cycle; + +snubCubeLeft[8]= + (-54.2898,183.824,100)-- + (-100,54.2898,183.824)-- + (-183.824,100,54.2898)-- + cycle; + +snubCubeLeft[9]= + (-100,183.824,-54.2898)-- + (-183.824,54.2898,-100)-- + (-54.2898,100,-183.824)-- + cycle; + +snubCubeLeft[10]= + (-100,-183.824,54.2898)-- + (-183.824,-54.2898,100)-- + (-54.2898,-100,183.824)-- + cycle; + +snubCubeLeft[11]= + (-54.2898,-183.824,-100)-- + (-100,-54.2898,-183.824)-- + (-183.824,-100,-54.2898)-- + cycle; + +snubCubeLeft[12]= + (100,-183.824,-54.2898)-- + (183.824,-54.2898,-100)-- + (54.2898,-100,-183.824)-- + cycle; + +snubCubeLeft[13]= + (54.2898,-183.824,100)-- + (100,-54.2898,183.824)-- + (183.824,-100,54.2898)-- + cycle; + +snubCubeLeft[14]= + (183.824,-54.2898,-100)-- + (100,54.2898,-183.824)-- + (183.824,100,-54.2898)-- + cycle; + +snubCubeLeft[15]= + (183.824,-54.2898,-100)-- + (100,54.2898,-183.824)-- + (54.2898,-100,-183.824)-- + cycle; + +snubCubeLeft[16]= + (100,-54.2898,183.824)-- + (183.824,54.2898,100)-- + (54.2898,100,183.824)-- + cycle; + +snubCubeLeft[17]= + (100,-54.2898,183.824)-- + (183.824,54.2898,100)-- + (183.824,-100,54.2898)-- + cycle; + +snubCubeLeft[18]= + (-183.824,-54.2898,100)-- + (-100,54.2898,183.824)-- + (-183.824,100,54.2898)-- + cycle; + +snubCubeLeft[19]= + (-183.824,-54.2898,100)-- + (-100,54.2898,183.824)-- + (-54.2898,-100,183.824)-- + cycle; + +snubCubeLeft[20]= + (-100,-54.2898,-183.824)-- + (-183.824,54.2898,-100)-- + (-54.2898,100,-183.824)-- + cycle; + +snubCubeLeft[21]= + (-100,-54.2898,-183.824)-- + (-183.824,54.2898,-100)-- + (-183.824,-100,-54.2898)-- + cycle; + +snubCubeLeft[22]= + (100,183.824,54.2898)-- + (183.824,100,-54.2898)-- + (54.2898,183.824,-100)-- + cycle; + +snubCubeLeft[23]= + (100,183.824,54.2898)-- + (183.824,100,-54.2898)-- + (183.824,54.2898,100)-- + cycle; + +snubCubeLeft[24]= + (-54.2898,183.824,100)-- + (54.2898,100,183.824)-- + (100,183.824,54.2898)-- + cycle; + +snubCubeLeft[25]= + (-54.2898,183.824,100)-- + (54.2898,100,183.824)-- + (-100,54.2898,183.824)-- + cycle; + +snubCubeLeft[26]= + (-100,183.824,-54.2898)-- + (-183.824,100,54.2898)-- + (-54.2898,183.824,100)-- + cycle; + +snubCubeLeft[27]= + (-100,183.824,-54.2898)-- + (-183.824,100,54.2898)-- + (-183.824,54.2898,-100)-- + cycle; + +snubCubeLeft[28]= + (54.2898,183.824,-100)-- + (-54.2898,100,-183.824)-- + (-100,183.824,-54.2898)-- + cycle; + +snubCubeLeft[29]= + (54.2898,183.824,-100)-- + (-54.2898,100,-183.824)-- + (100,54.2898,-183.824)-- + cycle; + +snubCubeLeft[30]= + (-100,-183.824,54.2898)-- + (-183.824,-100,-54.2898)-- + (-54.2898,-183.824,-100)-- + cycle; + +snubCubeLeft[31]= + (-100,-183.824,54.2898)-- + (-183.824,-100,-54.2898)-- + (-183.824,-54.2898,100)-- + cycle; + +snubCubeLeft[32]= + (-54.2898,-183.824,-100)-- + (54.2898,-100,-183.824)-- + (100,-183.824,-54.2898)-- + cycle; + +snubCubeLeft[33]= + (-54.2898,-183.824,-100)-- + (54.2898,-100,-183.824)-- + (-100,-54.2898,-183.824)-- + cycle; + +snubCubeLeft[34]= + (100,-183.824,-54.2898)-- + (183.824,-100,54.2898)-- + (54.2898,-183.824,100)-- + cycle; + +snubCubeLeft[35]= + (100,-183.824,-54.2898)-- + (183.824,-100,54.2898)-- + (183.824,-54.2898,-100)-- + cycle; + +snubCubeLeft[36]= + (54.2898,-183.824,100)-- + (-54.2898,-100,183.824)-- + (-100,-183.824,54.2898)-- + cycle; + +snubCubeLeft[37]= + (54.2898,-183.824,100)-- + (-54.2898,-100,183.824)-- + (100,-54.2898,183.824)-- + cycle; +snubCubeLeft=scale3(1/abs(point(snubCubeLeft[0],0)))*snubCubeLeft; + +//*** end of snubCubeLeft *** + +//*** start of icosDod *** +icosDod[0]= + (30.9017,50,-80.9017)-- + (0,0,-100)-- + (30.9017,-50,-80.9017)-- + (80.9017,-30.9017,-50)-- + (80.9017,30.9017,-50)-- + cycle; + +icosDod[1]= + (30.9017,-50,80.9017)-- + (0,0,100)-- + (30.9017,50,80.9017)-- + (80.9017,30.9017,50)-- + (80.9017,-30.9017,50)-- + cycle; + +icosDod[2]= + (-80.9017,-30.9017,50)-- + (-80.9017,30.9017,50)-- + (-30.9017,50,80.9017)-- + (0,0,100)-- + (-30.9017,-50,80.9017)-- + cycle; + +icosDod[3]= + (-80.9017,30.9017,-50)-- + (-80.9017,-30.9017,-50)-- + (-30.9017,-50,-80.9017)-- + (0,0,-100)-- + (-30.9017,50,-80.9017)-- + cycle; + +icosDod[4]= + (50,80.9017,30.9017)-- + (50,80.9017,-30.9017)-- + (80.9017,30.9017,-50)-- + (100,0,0)-- + (80.9017,30.9017,50)-- + cycle; + +icosDod[5]= + (30.9017,50,80.9017)-- + (-30.9017,50,80.9017)-- + (-50,80.9017,30.9017)-- + (0,100,0)-- + (50,80.9017,30.9017)-- + cycle; + +icosDod[6]= + (-50,80.9017,30.9017)-- + (-80.9017,30.9017,50)-- + (-100,0,0)-- + (-80.9017,30.9017,-50)-- + (-50,80.9017,-30.9017)-- + cycle; + +icosDod[7]= + (-30.9017,50,-80.9017)-- + (30.9017,50,-80.9017)-- + (50,80.9017,-30.9017)-- + (0,100,0)-- + (-50,80.9017,-30.9017)-- + cycle; + +icosDod[8]= + (-50,-80.9017,-30.9017)-- + (-80.9017,-30.9017,-50)-- + (-100,0,0)-- + (-80.9017,-30.9017,50)-- + (-50,-80.9017,30.9017)-- + cycle; + +icosDod[9]= + (30.9017,-50,-80.9017)-- + (-30.9017,-50,-80.9017)-- + (-50,-80.9017,-30.9017)-- + (0,-100,0)-- + (50,-80.9017,-30.9017)-- + cycle; + +icosDod[10]= + (50,-80.9017,-30.9017)-- + (50,-80.9017,30.9017)-- + (80.9017,-30.9017,50)-- + (100,0,0)-- + (80.9017,-30.9017,-50)-- + cycle; + +icosDod[11]= + (-30.9017,-50,80.9017)-- + (30.9017,-50,80.9017)-- + (50,-80.9017,30.9017)-- + (0,-100,0)-- + (-50,-80.9017,30.9017)-- + cycle; + +icosDod[12]= + (80.9017,30.9017,-50)-- + (30.9017,50,-80.9017)-- + (50,80.9017,-30.9017)-- + cycle; + +icosDod[13]= + (30.9017,50,80.9017)-- + (80.9017,30.9017,50)-- + (50,80.9017,30.9017)-- + cycle; + +icosDod[14]= + (-80.9017,30.9017,50)-- + (-30.9017,50,80.9017)-- + (-50,80.9017,30.9017)-- + cycle; + +icosDod[15]= + (-30.9017,50,-80.9017)-- + (-80.9017,30.9017,-50)-- + (-50,80.9017,-30.9017)-- + cycle; + +icosDod[16]= + (-30.9017,-50,80.9017)-- + (-80.9017,-30.9017,50)-- + (-50,-80.9017,30.9017)-- + cycle; + +icosDod[17]= + (-30.9017,-50,-80.9017)-- + (-50,-80.9017,-30.9017)-- + (-80.9017,-30.9017,-50)-- + cycle; + +icosDod[18]= + (80.9017,-30.9017,-50)-- + (50,-80.9017,-30.9017)-- + (30.9017,-50,-80.9017)-- + cycle; + +icosDod[19]= + (30.9017,-50,80.9017)-- + (50,-80.9017,30.9017)-- + (80.9017,-30.9017,50)-- + cycle; + +icosDod[20]= + (80.9017,-30.9017,-50)-- + (80.9017,30.9017,-50)-- + (100,0,0)-- + cycle; + +icosDod[21]= + (80.9017,30.9017,50)-- + (80.9017,-30.9017,50)-- + (100,0,0)-- + cycle; + +icosDod[22]= + (-80.9017,-30.9017,50)-- + (-80.9017,30.9017,50)-- + (-100,0,0)-- + cycle; + +icosDod[23]= + (-80.9017,30.9017,-50)-- + (-80.9017,-30.9017,-50)-- + (-100,0,0)-- + cycle; + +icosDod[24]= + (-30.9017,50,-80.9017)-- + (30.9017,50,-80.9017)-- + (0,0,-100)-- + cycle; + +icosDod[25]= + (30.9017,-50,-80.9017)-- + (-30.9017,-50,-80.9017)-- + (0,0,-100)-- + cycle; + +icosDod[26]= + (-30.9017,-50,80.9017)-- + (30.9017,-50,80.9017)-- + (0,0,100)-- + cycle; + +icosDod[27]= + (30.9017,50,80.9017)-- + (-30.9017,50,80.9017)-- + (0,0,100)-- + cycle; + +icosDod[28]= + (50,80.9017,30.9017)-- + (50,80.9017,-30.9017)-- + (0,100,0)-- + cycle; + +icosDod[29]= + (-50,80.9017,-30.9017)-- + (-50,80.9017,30.9017)-- + (0,100,0)-- + cycle; + +icosDod[30]= + (-50,-80.9017,30.9017)-- + (-50,-80.9017,-30.9017)-- + (0,-100,0)-- + cycle; + +icosDod[31]= + (50,-80.9017,-30.9017)-- + (50,-80.9017,30.9017)-- + (0,-100,0)-- + cycle; +icosDod=scale3(1/abs(point(icosDod[0],0)))*icosDod; + +//*** end of icosDod *** + +//*** start of truncateDodeca *** +truncateDodeca[0]= + (16.8381,44.0828,-88.1656)-- + (44.0828,54.4894,-71.3275)-- + (71.3275,44.0828,-54.4894)-- + (88.1656,16.8381,-44.0828)-- + (88.1656,-16.8381,-44.0828)-- + (71.3275,-44.0828,-54.4894)-- + (44.0828,-54.4894,-71.3275)-- + (16.8381,-44.0828,-88.1656)-- + (0,-16.8381,-98.5722)-- + (0,16.8381,-98.5722)-- + cycle; + +truncateDodeca[1]= + (16.8381,-44.0828,88.1656)-- + (44.0828,-54.4894,71.3275)-- + (71.3275,-44.0828,54.4894)-- + (88.1656,-16.8381,44.0828)-- + (88.1656,16.8381,44.0828)-- + (71.3275,44.0828,54.4894)-- + (44.0828,54.4894,71.3275)-- + (16.8381,44.0828,88.1656)-- + (0,16.8381,98.5722)-- + (0,-16.8381,98.5722)-- + cycle; + +truncateDodeca[2]= + (-16.8381,-44.0828,88.1656)-- + (-44.0828,-54.4894,71.3275)-- + (-71.3275,-44.0828,54.4894)-- + (-88.1656,-16.8381,44.0828)-- + (-88.1656,16.8381,44.0828)-- + (-71.3275,44.0828,54.4894)-- + (-44.0828,54.4894,71.3275)-- + (-16.8381,44.0828,88.1656)-- + (0,16.8381,98.5722)-- + (0,-16.8381,98.5722)-- + cycle; + +truncateDodeca[3]= + (-16.8381,44.0828,-88.1656)-- + (-44.0828,54.4894,-71.3275)-- + (-71.3275,44.0828,-54.4894)-- + (-88.1656,16.8381,-44.0828)-- + (-88.1656,-16.8381,-44.0828)-- + (-71.3275,-44.0828,-54.4894)-- + (-44.0828,-54.4894,-71.3275)-- + (-16.8381,-44.0828,-88.1656)-- + (0,-16.8381,-98.5722)-- + (0,16.8381,-98.5722)-- + cycle; + +truncateDodeca[4]= + (44.0828,88.1656,-16.8381)-- + (54.4894,71.3275,-44.0828)-- + (71.3275,44.0828,-54.4894)-- + (88.1656,16.8381,-44.0828)-- + (98.5722,0,-16.8381)-- + (98.5722,0,16.8381)-- + (88.1656,16.8381,44.0828)-- + (71.3275,44.0828,54.4894)-- + (54.4894,71.3275,44.0828)-- + (44.0828,88.1656,16.8381)-- + cycle; + +truncateDodeca[5]= + (16.8381,98.5722,0)-- + (-16.8381,98.5722,0)-- + (-44.0828,88.1656,16.8381)-- + (-54.4894,71.3275,44.0828)-- + (-44.0828,54.4894,71.3275)-- + (-16.8381,44.0828,88.1656)-- + (16.8381,44.0828,88.1656)-- + (44.0828,54.4894,71.3275)-- + (54.4894,71.3275,44.0828)-- + (44.0828,88.1656,16.8381)-- + cycle; + +truncateDodeca[6]= + (-44.0828,88.1656,16.8381)-- + (-44.0828,88.1656,-16.8381)-- + (-54.4894,71.3275,-44.0828)-- + (-71.3275,44.0828,-54.4894)-- + (-88.1656,16.8381,-44.0828)-- + (-98.5722,0,-16.8381)-- + (-98.5722,0,16.8381)-- + (-88.1656,16.8381,44.0828)-- + (-71.3275,44.0828,54.4894)-- + (-54.4894,71.3275,44.0828)-- + cycle; + +truncateDodeca[7]= + (16.8381,98.5722,0)-- + (-16.8381,98.5722,0)-- + (-44.0828,88.1656,-16.8381)-- + (-54.4894,71.3275,-44.0828)-- + (-44.0828,54.4894,-71.3275)-- + (-16.8381,44.0828,-88.1656)-- + (16.8381,44.0828,-88.1656)-- + (44.0828,54.4894,-71.3275)-- + (54.4894,71.3275,-44.0828)-- + (44.0828,88.1656,-16.8381)-- + cycle; + +truncateDodeca[8]= + (-44.0828,-88.1656,16.8381)-- + (-54.4894,-71.3275,44.0828)-- + (-71.3275,-44.0828,54.4894)-- + (-88.1656,-16.8381,44.0828)-- + (-98.5722,0,16.8381)-- + (-98.5722,0,-16.8381)-- + (-88.1656,-16.8381,-44.0828)-- + (-71.3275,-44.0828,-54.4894)-- + (-54.4894,-71.3275,-44.0828)-- + (-44.0828,-88.1656,-16.8381)-- + cycle; + +truncateDodeca[9]= + (-16.8381,-98.5722,0)-- + (16.8381,-98.5722,0)-- + (44.0828,-88.1656,-16.8381)-- + (54.4894,-71.3275,-44.0828)-- + (44.0828,-54.4894,-71.3275)-- + (16.8381,-44.0828,-88.1656)-- + (-16.8381,-44.0828,-88.1656)-- + (-44.0828,-54.4894,-71.3275)-- + (-54.4894,-71.3275,-44.0828)-- + (-44.0828,-88.1656,-16.8381)-- + cycle; + +truncateDodeca[10]= + (44.0828,-88.1656,16.8381)-- + (44.0828,-88.1656,-16.8381)-- + (54.4894,-71.3275,-44.0828)-- + (71.3275,-44.0828,-54.4894)-- + (88.1656,-16.8381,-44.0828)-- + (98.5722,0,-16.8381)-- + (98.5722,0,16.8381)-- + (88.1656,-16.8381,44.0828)-- + (71.3275,-44.0828,54.4894)-- + (54.4894,-71.3275,44.0828)-- + cycle; + +truncateDodeca[11]= + (-16.8381,-98.5722,0)-- + (16.8381,-98.5722,0)-- + (44.0828,-88.1656,16.8381)-- + (54.4894,-71.3275,44.0828)-- + (44.0828,-54.4894,71.3275)-- + (16.8381,-44.0828,88.1656)-- + (-16.8381,-44.0828,88.1656)-- + (-44.0828,-54.4894,71.3275)-- + (-54.4894,-71.3275,44.0828)-- + (-44.0828,-88.1656,16.8381)-- + cycle; + +truncateDodeca[12]= + (98.5722,0,-16.8381)-- + (88.1656,16.8381,-44.0828)-- + (88.1656,-16.8381,-44.0828)-- + cycle; + +truncateDodeca[13]= + (98.5722,0,16.8381)-- + (88.1656,-16.8381,44.0828)-- + (88.1656,16.8381,44.0828)-- + cycle; + +truncateDodeca[14]= + (-98.5722,0,16.8381)-- + (-88.1656,16.8381,44.0828)-- + (-88.1656,-16.8381,44.0828)-- + cycle; + +truncateDodeca[15]= + (-98.5722,0,-16.8381)-- + (-88.1656,-16.8381,-44.0828)-- + (-88.1656,16.8381,-44.0828)-- + cycle; + +truncateDodeca[16]= + (0,16.8381,-98.5722)-- + (16.8381,44.0828,-88.1656)-- + (-16.8381,44.0828,-88.1656)-- + cycle; + +truncateDodeca[17]= + (0,-16.8381,-98.5722)-- + (-16.8381,-44.0828,-88.1656)-- + (16.8381,-44.0828,-88.1656)-- + cycle; + +truncateDodeca[18]= + (0,-16.8381,98.5722)-- + (16.8381,-44.0828,88.1656)-- + (-16.8381,-44.0828,88.1656)-- + cycle; + +truncateDodeca[19]= + (0,16.8381,98.5722)-- + (-16.8381,44.0828,88.1656)-- + (16.8381,44.0828,88.1656)-- + cycle; + +truncateDodeca[20]= + (16.8381,98.5722,0)-- + (44.0828,88.1656,-16.8381)-- + (44.0828,88.1656,16.8381)-- + cycle; + +truncateDodeca[21]= + (-16.8381,98.5722,0)-- + (-44.0828,88.1656,16.8381)-- + (-44.0828,88.1656,-16.8381)-- + cycle; + +truncateDodeca[22]= + (-16.8381,-98.5722,0)-- + (-44.0828,-88.1656,-16.8381)-- + (-44.0828,-88.1656,16.8381)-- + cycle; + +truncateDodeca[23]= + (16.8381,-98.5722,0)-- + (44.0828,-88.1656,16.8381)-- + (44.0828,-88.1656,-16.8381)-- + cycle; + +truncateDodeca[24]= + (44.0828,54.4894,-71.3275)-- + (71.3275,44.0828,-54.4894)-- + (54.4894,71.3275,-44.0828)-- + cycle; + +truncateDodeca[25]= + (71.3275,44.0828,54.4894)-- + (44.0828,54.4894,71.3275)-- + (54.4894,71.3275,44.0828)-- + cycle; + +truncateDodeca[26]= + (-44.0828,54.4894,71.3275)-- + (-71.3275,44.0828,54.4894)-- + (-54.4894,71.3275,44.0828)-- + cycle; + +truncateDodeca[27]= + (-71.3275,44.0828,-54.4894)-- + (-44.0828,54.4894,-71.3275)-- + (-54.4894,71.3275,-44.0828)-- + cycle; + +truncateDodeca[28]= + (-54.4894,-71.3275,44.0828)-- + (-71.3275,-44.0828,54.4894)-- + (-44.0828,-54.4894,71.3275)-- + cycle; + +truncateDodeca[29]= + (-71.3275,-44.0828,-54.4894)-- + (-54.4894,-71.3275,-44.0828)-- + (-44.0828,-54.4894,-71.3275)-- + cycle; + +truncateDodeca[30]= + (44.0828,-54.4894,-71.3275)-- + (54.4894,-71.3275,-44.0828)-- + (71.3275,-44.0828,-54.4894)-- + cycle; + +truncateDodeca[31]= + (71.3275,-44.0828,54.4894)-- + (54.4894,-71.3275,44.0828)-- + (44.0828,-54.4894,71.3275)-- + cycle; +truncateDodeca=scale3(1/abs(point(truncateDodeca[0],0)))*truncateDodeca; + +//*** end of truncateDodeca *** + +//*** start of truncIcos *** +truncIcos[0]= + (20.1774,0,-97.9432)-- + (40.3548,-32.6477,-85.4729)-- + (73.0026,-20.1774,-65.2955)-- + (73.0026,20.1774,-65.2955)-- + (40.3548,32.6477,-85.4729)-- + cycle; + +truncIcos[1]= + (20.1774,0,97.9432)-- + (40.3548,32.6477,85.4729)-- + (73.0026,20.1774,65.2955)-- + (73.0026,-20.1774,65.2955)-- + (40.3548,-32.6477,85.4729)-- + cycle; + +truncIcos[2]= + (-20.1774,0,97.9432)-- + (-40.3548,-32.6477,85.4729)-- + (-73.0026,-20.1774,65.2955)-- + (-73.0026,20.1774,65.2955)-- + (-40.3548,32.6477,85.4729)-- + cycle; + +truncIcos[3]= + (-20.1774,0,-97.9432)-- + (-40.3548,32.6477,-85.4729)-- + (-73.0026,20.1774,-65.2955)-- + (-73.0026,-20.1774,-65.2955)-- + (-40.3548,-32.6477,-85.4729)-- + cycle; + +truncIcos[4]= + (97.9432,20.1774,0)-- + (85.4729,40.3548,32.6477)-- + (65.2955,73.0026,20.1774)-- + (65.2955,73.0026,-20.1774)-- + (85.4729,40.3548,-32.6477)-- + cycle; + +truncIcos[5]= + (0,97.9432,20.1774)-- + (32.6477,85.4729,40.3548)-- + (20.1774,65.2955,73.0026)-- + (-20.1774,65.2955,73.0026)-- + (-32.6477,85.4729,40.3548)-- + cycle; + +truncIcos[6]= + (-97.9432,20.1774,0)-- + (-85.4729,40.3548,-32.6477)-- + (-65.2955,73.0026,-20.1774)-- + (-65.2955,73.0026,20.1774)-- + (-85.4729,40.3548,32.6477)-- + cycle; + +truncIcos[7]= + (0,97.9432,-20.1774)-- + (-32.6477,85.4729,-40.3548)-- + (-20.1774,65.2955,-73.0026)-- + (20.1774,65.2955,-73.0026)-- + (32.6477,85.4729,-40.3548)-- + cycle; + +truncIcos[8]= + (-97.9432,-20.1774,0)-- + (-85.4729,-40.3548,32.6477)-- + (-65.2955,-73.0026,20.1774)-- + (-65.2955,-73.0026,-20.1774)-- + (-85.4729,-40.3548,-32.6477)-- + cycle; + +truncIcos[9]= + (0,-97.9432,-20.1774)-- + (32.6477,-85.4729,-40.3548)-- + (20.1774,-65.2955,-73.0026)-- + (-20.1774,-65.2955,-73.0026)-- + (-32.6477,-85.4729,-40.3548)-- + cycle; + +truncIcos[10]= + (97.9432,-20.1774,0)-- + (85.4729,-40.3548,-32.6477)-- + (65.2955,-73.0026,-20.1774)-- + (65.2955,-73.0026,20.1774)-- + (85.4729,-40.3548,32.6477)-- + cycle; + +truncIcos[11]= + (0,-97.9432,20.1774)-- + (-32.6477,-85.4729,40.3548)-- + (-20.1774,-65.2955,73.0026)-- + (20.1774,-65.2955,73.0026)-- + (32.6477,-85.4729,40.3548)-- + cycle; + +truncIcos[12]= + (85.4729,40.3548,-32.6477)-- + (97.9432,20.1774,0)-- + (97.9432,-20.1774,0)-- + (85.4729,-40.3548,-32.6477)-- + (73.0026,-20.1774,-65.2955)-- + (73.0026,20.1774,-65.2955)-- + cycle; + +truncIcos[13]= + (85.4729,-40.3548,32.6477)-- + (97.9432,-20.1774,0)-- + (97.9432,20.1774,0)-- + (85.4729,40.3548,32.6477)-- + (73.0026,20.1774,65.2955)-- + (73.0026,-20.1774,65.2955)-- + cycle; + +truncIcos[14]= + (-85.4729,40.3548,32.6477)-- + (-97.9432,20.1774,0)-- + (-97.9432,-20.1774,0)-- + (-85.4729,-40.3548,32.6477)-- + (-73.0026,-20.1774,65.2955)-- + (-73.0026,20.1774,65.2955)-- + cycle; + +truncIcos[15]= + (-85.4729,-40.3548,-32.6477)-- + (-97.9432,-20.1774,0)-- + (-97.9432,20.1774,0)-- + (-85.4729,40.3548,-32.6477)-- + (-73.0026,20.1774,-65.2955)-- + (-73.0026,-20.1774,-65.2955)-- + cycle; + +truncIcos[16]= + (40.3548,32.6477,-85.4729)-- + (20.1774,0,-97.9432)-- + (-20.1774,0,-97.9432)-- + (-40.3548,32.6477,-85.4729)-- + (-20.1774,65.2955,-73.0026)-- + (20.1774,65.2955,-73.0026)-- + cycle; + +truncIcos[17]= + (-40.3548,-32.6477,-85.4729)-- + (-20.1774,0,-97.9432)-- + (20.1774,0,-97.9432)-- + (40.3548,-32.6477,-85.4729)-- + (20.1774,-65.2955,-73.0026)-- + (-20.1774,-65.2955,-73.0026)-- + cycle; + +truncIcos[18]= + (40.3548,-32.6477,85.4729)-- + (20.1774,0,97.9432)-- + (-20.1774,0,97.9432)-- + (-40.3548,-32.6477,85.4729)-- + (-20.1774,-65.2955,73.0026)-- + (20.1774,-65.2955,73.0026)-- + cycle; + +truncIcos[19]= + (-40.3548,32.6477,85.4729)-- + (-20.1774,0,97.9432)-- + (20.1774,0,97.9432)-- + (40.3548,32.6477,85.4729)-- + (20.1774,65.2955,73.0026)-- + (-20.1774,65.2955,73.0026)-- + cycle; + +truncIcos[20]= + (32.6477,85.4729,-40.3548)-- + (0,97.9432,-20.1774)-- + (0,97.9432,20.1774)-- + (32.6477,85.4729,40.3548)-- + (65.2955,73.0026,20.1774)-- + (65.2955,73.0026,-20.1774)-- + cycle; + +truncIcos[21]= + (-32.6477,85.4729,40.3548)-- + (0,97.9432,20.1774)-- + (0,97.9432,-20.1774)-- + (-32.6477,85.4729,-40.3548)-- + (-65.2955,73.0026,-20.1774)-- + (-65.2955,73.0026,20.1774)-- + cycle; + +truncIcos[22]= + (-32.6477,-85.4729,-40.3548)-- + (0,-97.9432,-20.1774)-- + (0,-97.9432,20.1774)-- + (-32.6477,-85.4729,40.3548)-- + (-65.2955,-73.0026,20.1774)-- + (-65.2955,-73.0026,-20.1774)-- + cycle; + +truncIcos[23]= + (32.6477,-85.4729,40.3548)-- + (0,-97.9432,20.1774)-- + (0,-97.9432,-20.1774)-- + (32.6477,-85.4729,-40.3548)-- + (65.2955,-73.0026,-20.1774)-- + (65.2955,-73.0026,20.1774)-- + cycle; + +truncIcos[24]= + (20.1774,65.2955,-73.0026)-- + (32.6477,85.4729,-40.3548)-- + (65.2955,73.0026,-20.1774)-- + (85.4729,40.3548,-32.6477)-- + (73.0026,20.1774,-65.2955)-- + (40.3548,32.6477,-85.4729)-- + cycle; + +truncIcos[25]= + (85.4729,40.3548,32.6477)-- + (73.0026,20.1774,65.2955)-- + (40.3548,32.6477,85.4729)-- + (20.1774,65.2955,73.0026)-- + (32.6477,85.4729,40.3548)-- + (65.2955,73.0026,20.1774)-- + cycle; + +truncIcos[26]= + (-73.0026,20.1774,65.2955)-- + (-40.3548,32.6477,85.4729)-- + (-20.1774,65.2955,73.0026)-- + (-32.6477,85.4729,40.3548)-- + (-65.2955,73.0026,20.1774)-- + (-85.4729,40.3548,32.6477)-- + cycle; + +truncIcos[27]= + (-85.4729,40.3548,-32.6477)-- + (-65.2955,73.0026,-20.1774)-- + (-32.6477,85.4729,-40.3548)-- + (-20.1774,65.2955,-73.0026)-- + (-40.3548,32.6477,-85.4729)-- + (-73.0026,20.1774,-65.2955)-- + cycle; + +truncIcos[28]= + (-85.4729,-40.3548,32.6477)-- + (-65.2955,-73.0026,20.1774)-- + (-32.6477,-85.4729,40.3548)-- + (-20.1774,-65.2955,73.0026)-- + (-40.3548,-32.6477,85.4729)-- + (-73.0026,-20.1774,65.2955)-- + cycle; + +truncIcos[29]= + (-20.1774,-65.2955,-73.0026)-- + (-32.6477,-85.4729,-40.3548)-- + (-65.2955,-73.0026,-20.1774)-- + (-85.4729,-40.3548,-32.6477)-- + (-73.0026,-20.1774,-65.2955)-- + (-40.3548,-32.6477,-85.4729)-- + cycle; + +truncIcos[30]= + (85.4729,-40.3548,-32.6477)-- + (65.2955,-73.0026,-20.1774)-- + (32.6477,-85.4729,-40.3548)-- + (20.1774,-65.2955,-73.0026)-- + (40.3548,-32.6477,-85.4729)-- + (73.0026,-20.1774,-65.2955)-- + cycle; + +truncIcos[31]= + (20.1774,-65.2955,73.0026)-- + (32.6477,-85.4729,40.3548)-- + (65.2955,-73.0026,20.1774)-- + (85.4729,-40.3548,32.6477)-- + (73.0026,-20.1774,65.2955)-- + (40.3548,-32.6477,85.4729)-- + cycle; +truncIcos=scale3(1/abs(point(truncIcos[0],0)))*truncIcos; + +//*** end of truncIcos *** + +//*** start of rhombicosDodec *** +rhombicosDodec[0]= + (-22.3919,94.8536,-22.3919)-- + (-36.2309,72.4617,-58.6227)-- + (0,58.6227,-81.0146)-- + (36.2309,72.4617,-58.6227)-- + (22.3919,94.8536,-22.3919)-- + cycle; + +rhombicosDodec[1]= + (22.3919,94.8536,22.3919)-- + (36.2309,72.4617,58.6227)-- + (0,58.6227,81.0146)-- + (-36.2309,72.4617,58.6227)-- + (-22.3919,94.8536,22.3919)-- + cycle; + +rhombicosDodec[2]= + (-22.3919,-94.8536,22.3919)-- + (-36.2309,-72.4617,58.6227)-- + (0,-58.6227,81.0146)-- + (36.2309,-72.4617,58.6227)-- + (22.3919,-94.8536,22.3919)-- + cycle; + +rhombicosDodec[3]= + (22.3919,-94.8536,-22.3919)-- + (36.2309,-72.4617,-58.6227)-- + (0,-58.6227,-81.0146)-- + (-36.2309,-72.4617,-58.6227)-- + (-22.3919,-94.8536,-22.3919)-- + cycle; + +rhombicosDodec[4]= + (22.3919,-22.3919,-94.8536)-- + (58.6227,-36.2309,-72.4617)-- + (81.0146,0,-58.6227)-- + (58.6227,36.2309,-72.4617)-- + (22.3919,22.3919,-94.8536)-- + cycle; + +rhombicosDodec[5]= + (-22.3919,22.3919,-94.8536)-- + (-58.6227,36.2309,-72.4617)-- + (-81.0146,0,-58.6227)-- + (-58.6227,-36.2309,-72.4617)-- + (-22.3919,-22.3919,-94.8536)-- + cycle; + +rhombicosDodec[6]= + (-22.3919,-22.3919,94.8536)-- + (-58.6227,-36.2309,72.4617)-- + (-81.0146,0,58.6227)-- + (-58.6227,36.2309,72.4617)-- + (-22.3919,22.3919,94.8536)-- + cycle; + +rhombicosDodec[7]= + (22.3919,22.3919,94.8536)-- + (58.6227,36.2309,72.4617)-- + (81.0146,0,58.6227)-- + (58.6227,-36.2309,72.4617)-- + (22.3919,-22.3919,94.8536)-- + cycle; + +rhombicosDodec[8]= + (94.8536,22.3919,22.3919)-- + (72.4617,58.6227,36.2309)-- + (58.6227,81.0146,0)-- + (72.4617,58.6227,-36.2309)-- + (94.8536,22.3919,-22.3919)-- + cycle; + +rhombicosDodec[9]= + (94.8536,-22.3919,-22.3919)-- + (72.4617,-58.6227,-36.2309)-- + (58.6227,-81.0146,0)-- + (72.4617,-58.6227,36.2309)-- + (94.8536,-22.3919,22.3919)-- + cycle; + +rhombicosDodec[10]= + (-94.8536,-22.3919,22.3919)-- + (-72.4617,-58.6227,36.2309)-- + (-58.6227,-81.0146,0)-- + (-72.4617,-58.6227,-36.2309)-- + (-94.8536,-22.3919,-22.3919)-- + cycle; + +rhombicosDodec[11]= + (-94.8536,22.3919,-22.3919)-- + (-72.4617,58.6227,-36.2309)-- + (-58.6227,81.0146,0)-- + (-72.4617,58.6227,36.2309)-- + (-94.8536,22.3919,22.3919)-- + cycle; + +rhombicosDodec[12]= + (22.3919,94.8536,22.3919)-- + (22.3919,94.8536,-22.3919)-- + (-22.3919,94.8536,-22.3919)-- + (-22.3919,94.8536,22.3919)-- + cycle; + +rhombicosDodec[13]= + (22.3919,-94.8536,-22.3919)-- + (22.3919,-94.8536,22.3919)-- + (-22.3919,-94.8536,22.3919)-- + (-22.3919,-94.8536,-22.3919)-- + cycle; + +rhombicosDodec[14]= + (-22.3919,22.3919,-94.8536)-- + (22.3919,22.3919,-94.8536)-- + (22.3919,-22.3919,-94.8536)-- + (-22.3919,-22.3919,-94.8536)-- + cycle; + +rhombicosDodec[15]= + (22.3919,22.3919,94.8536)-- + (-22.3919,22.3919,94.8536)-- + (-22.3919,-22.3919,94.8536)-- + (22.3919,-22.3919,94.8536)-- + cycle; + +rhombicosDodec[16]= + (94.8536,-22.3919,-22.3919)-- + (94.8536,22.3919,-22.3919)-- + (94.8536,22.3919,22.3919)-- + (94.8536,-22.3919,22.3919)-- + cycle; + +rhombicosDodec[17]= + (-94.8536,22.3919,-22.3919)-- + (-94.8536,-22.3919,-22.3919)-- + (-94.8536,-22.3919,22.3919)-- + (-94.8536,22.3919,22.3919)-- + cycle; + +rhombicosDodec[18]= + (36.2309,72.4617,-58.6227)-- + (22.3919,94.8536,-22.3919)-- + (58.6227,81.0146,0)-- + (72.4617,58.6227,-36.2309)-- + cycle; + +rhombicosDodec[19]= + (58.6227,81.0146,0)-- + (22.3919,94.8536,22.3919)-- + (36.2309,72.4617,58.6227)-- + (72.4617,58.6227,36.2309)-- + cycle; + +rhombicosDodec[20]= + (-36.2309,72.4617,58.6227)-- + (-22.3919,94.8536,22.3919)-- + (-58.6227,81.0146,0)-- + (-72.4617,58.6227,36.2309)-- + cycle; + +rhombicosDodec[21]= + (-58.6227,81.0146,0)-- + (-22.3919,94.8536,-22.3919)-- + (-36.2309,72.4617,-58.6227)-- + (-72.4617,58.6227,-36.2309)-- + cycle; + +rhombicosDodec[22]= + (36.2309,-72.4617,58.6227)-- + (22.3919,-94.8536,22.3919)-- + (58.6227,-81.0146,0)-- + (72.4617,-58.6227,36.2309)-- + cycle; + +rhombicosDodec[23]= + (58.6227,-81.0146,0)-- + (22.3919,-94.8536,-22.3919)-- + (36.2309,-72.4617,-58.6227)-- + (72.4617,-58.6227,-36.2309)-- + cycle; + +rhombicosDodec[24]= + (-36.2309,-72.4617,-58.6227)-- + (-22.3919,-94.8536,-22.3919)-- + (-58.6227,-81.0146,0)-- + (-72.4617,-58.6227,-36.2309)-- + cycle; + +rhombicosDodec[25]= + (-58.6227,-81.0146,0)-- + (-22.3919,-94.8536,22.3919)-- + (-36.2309,-72.4617,58.6227)-- + (-72.4617,-58.6227,36.2309)-- + cycle; + +rhombicosDodec[26]= + (58.6227,36.2309,-72.4617)-- + (22.3919,22.3919,-94.8536)-- + (0,58.6227,-81.0146)-- + (36.2309,72.4617,-58.6227)-- + cycle; + +rhombicosDodec[27]= + (0,58.6227,-81.0146)-- + (-22.3919,22.3919,-94.8536)-- + (-58.6227,36.2309,-72.4617)-- + (-36.2309,72.4617,-58.6227)-- + cycle; + +rhombicosDodec[28]= + (-58.6227,-36.2309,-72.4617)-- + (-22.3919,-22.3919,-94.8536)-- + (0,-58.6227,-81.0146)-- + (-36.2309,-72.4617,-58.6227)-- + cycle; + +rhombicosDodec[29]= + (0,-58.6227,-81.0146)-- + (22.3919,-22.3919,-94.8536)-- + (58.6227,-36.2309,-72.4617)-- + (36.2309,-72.4617,-58.6227)-- + cycle; + +rhombicosDodec[30]= + (-58.6227,36.2309,72.4617)-- + (-22.3919,22.3919,94.8536)-- + (0,58.6227,81.0146)-- + (-36.2309,72.4617,58.6227)-- + cycle; + +rhombicosDodec[31]= + (0,58.6227,81.0146)-- + (22.3919,22.3919,94.8536)-- + (58.6227,36.2309,72.4617)-- + (36.2309,72.4617,58.6227)-- + cycle; + +rhombicosDodec[32]= + (58.6227,-36.2309,72.4617)-- + (22.3919,-22.3919,94.8536)-- + (0,-58.6227,81.0146)-- + (36.2309,-72.4617,58.6227)-- + cycle; + +rhombicosDodec[33]= + (0,-58.6227,81.0146)-- + (-22.3919,-22.3919,94.8536)-- + (-58.6227,-36.2309,72.4617)-- + (-36.2309,-72.4617,58.6227)-- + cycle; + +rhombicosDodec[34]= + (72.4617,58.6227,-36.2309)-- + (94.8536,22.3919,-22.3919)-- + (81.0146,0,-58.6227)-- + (58.6227,36.2309,-72.4617)-- + cycle; + +rhombicosDodec[35]= + (81.0146,0,-58.6227)-- + (94.8536,-22.3919,-22.3919)-- + (72.4617,-58.6227,-36.2309)-- + (58.6227,-36.2309,-72.4617)-- + cycle; + +rhombicosDodec[36]= + (72.4617,-58.6227,36.2309)-- + (94.8536,-22.3919,22.3919)-- + (81.0146,0,58.6227)-- + (58.6227,-36.2309,72.4617)-- + cycle; + +rhombicosDodec[37]= + (81.0146,0,58.6227)-- + (94.8536,22.3919,22.3919)-- + (72.4617,58.6227,36.2309)-- + (58.6227,36.2309,72.4617)-- + cycle; + +rhombicosDodec[38]= + (-72.4617,-58.6227,-36.2309)-- + (-94.8536,-22.3919,-22.3919)-- + (-81.0146,0,-58.6227)-- + (-58.6227,-36.2309,-72.4617)-- + cycle; + +rhombicosDodec[39]= + (-81.0146,0,-58.6227)-- + (-94.8536,22.3919,-22.3919)-- + (-72.4617,58.6227,-36.2309)-- + (-58.6227,36.2309,-72.4617)-- + cycle; + +rhombicosDodec[40]= + (-72.4617,58.6227,36.2309)-- + (-94.8536,22.3919,22.3919)-- + (-81.0146,0,58.6227)-- + (-58.6227,36.2309,72.4617)-- + cycle; + +rhombicosDodec[41]= + (-81.0146,0,58.6227)-- + (-94.8536,-22.3919,22.3919)-- + (-72.4617,-58.6227,36.2309)-- + (-58.6227,-36.2309,72.4617)-- + cycle; + +rhombicosDodec[42]= + (22.3919,94.8536,-22.3919)-- + (58.6227,81.0146,0)-- + (22.3919,94.8536,22.3919)-- + cycle; + +rhombicosDodec[43]= + (-22.3919,94.8536,-22.3919)-- + (-22.3919,94.8536,22.3919)-- + (-58.6227,81.0146,0)-- + cycle; + +rhombicosDodec[44]= + (22.3919,-94.8536,22.3919)-- + (58.6227,-81.0146,0)-- + (22.3919,-94.8536,-22.3919)-- + cycle; + +rhombicosDodec[45]= + (-22.3919,-94.8536,22.3919)-- + (-22.3919,-94.8536,-22.3919)-- + (-58.6227,-81.0146,0)-- + cycle; + +rhombicosDodec[46]= + (22.3919,22.3919,-94.8536)-- + (0,58.6227,-81.0146)-- + (-22.3919,22.3919,-94.8536)-- + cycle; + +rhombicosDodec[47]= + (22.3919,-22.3919,-94.8536)-- + (-22.3919,-22.3919,-94.8536)-- + (0,-58.6227,-81.0146)-- + cycle; + +rhombicosDodec[48]= + (-22.3919,22.3919,94.8536)-- + (0,58.6227,81.0146)-- + (22.3919,22.3919,94.8536)-- + cycle; + +rhombicosDodec[49]= + (-22.3919,-22.3919,94.8536)-- + (22.3919,-22.3919,94.8536)-- + (0,-58.6227,81.0146)-- + cycle; + +rhombicosDodec[50]= + (94.8536,22.3919,-22.3919)-- + (81.0146,0,-58.6227)-- + (94.8536,-22.3919,-22.3919)-- + cycle; + +rhombicosDodec[51]= + (94.8536,22.3919,22.3919)-- + (94.8536,-22.3919,22.3919)-- + (81.0146,0,58.6227)-- + cycle; + +rhombicosDodec[52]= + (-94.8536,-22.3919,-22.3919)-- + (-81.0146,0,-58.6227)-- + (-94.8536,22.3919,-22.3919)-- + cycle; + +rhombicosDodec[53]= + (-94.8536,-22.3919,22.3919)-- + (-94.8536,22.3919,22.3919)-- + (-81.0146,0,58.6227)-- + cycle; + +rhombicosDodec[54]= + (36.2309,72.4617,-58.6227)-- + (58.6227,36.2309,-72.4617)-- + (72.4617,58.6227,-36.2309)-- + cycle; + +rhombicosDodec[55]= + (58.6227,36.2309,72.4617)-- + (36.2309,72.4617,58.6227)-- + (72.4617,58.6227,36.2309)-- + cycle; + +rhombicosDodec[56]= + (-36.2309,72.4617,58.6227)-- + (-58.6227,36.2309,72.4617)-- + (-72.4617,58.6227,36.2309)-- + cycle; + +rhombicosDodec[57]= + (-58.6227,36.2309,-72.4617)-- + (-36.2309,72.4617,-58.6227)-- + (-72.4617,58.6227,-36.2309)-- + cycle; + +rhombicosDodec[58]= + (36.2309,-72.4617,58.6227)-- + (58.6227,-36.2309,72.4617)-- + (72.4617,-58.6227,36.2309)-- + cycle; + +rhombicosDodec[59]= + (36.2309,-72.4617,-58.6227)-- + (72.4617,-58.6227,-36.2309)-- + (58.6227,-36.2309,-72.4617)-- + cycle; + +rhombicosDodec[60]= + (-36.2309,-72.4617,-58.6227)-- + (-58.6227,-36.2309,-72.4617)-- + (-72.4617,-58.6227,-36.2309)-- + cycle; + +rhombicosDodec[61]= + (-58.6227,-36.2309,72.4617)-- + (-36.2309,-72.4617,58.6227)-- + (-72.4617,-58.6227,36.2309)-- + cycle; +rhombicosDodec=scale3(1/abs(point(rhombicosDodec[0],0)))*rhombicosDodec; + +//*** end of RhombicosDodec *** + +//*** start of snbDdcleft *** +snbDdcleft[0]= + (-28.6199,-92.0928,-26.5588)-- + (-33.4519,-68.4094,-64.8161)-- + (8.17712,-58.6781,-80.6249)-- + (37.9121,-76.4211,-51.8528)-- + (15.6109,-97.1734,-18.3382)-- + cycle; + +snbDdcleft[1]= + (28.6199,-92.0928,26.5588)-- + (33.4519,-68.4094,64.8161)-- + (-8.17712,-58.6781,80.6249)-- + (-37.9121,-76.4211,51.8528)-- + (-15.6109,-97.1734,18.3382)-- + cycle; + +snbDdcleft[2]= + (-28.6199,92.0928,26.5588)-- + (-33.4519,68.4094,64.8161)-- + (8.17712,58.6781,80.6249)-- + (37.9121,76.4211,51.8528)-- + (15.6109,97.1734,18.3382)-- + cycle; + +snbDdcleft[3]= + (28.6199,92.0928,-26.5588)-- + (33.4519,68.4094,-64.8161)-- + (-8.17712,58.6781,-80.6249)-- + (-37.9121,76.4211,-51.8528)-- + (-15.6109,97.1734,-18.3382)-- + cycle; + +snbDdcleft[4]= + (-92.0928,-26.5588,-28.6199)-- + (-68.4094,-64.8161,-33.4519)-- + (-58.6781,-80.6249,8.17712)-- + (-76.4211,-51.8528,37.9121)-- + (-97.1734,-18.3382,15.6109)-- + cycle; + +snbDdcleft[5]= + (-92.0928,26.5588,28.6199)-- + (-68.4094,64.8161,33.4519)-- + (-58.6781,80.6249,-8.17712)-- + (-76.4211,51.8528,-37.9121)-- + (-97.1734,18.3382,-15.6109)-- + cycle; + +snbDdcleft[6]= + (92.0928,26.5588,-28.6199)-- + (68.4094,64.8161,-33.4519)-- + (58.6781,80.6249,8.17712)-- + (76.4211,51.8528,37.9121)-- + (97.1734,18.3382,15.6109)-- + cycle; + +snbDdcleft[7]= + (92.0928,-26.5588,28.6199)-- + (68.4094,-64.8161,33.4519)-- + (58.6781,-80.6249,-8.17712)-- + (76.4211,-51.8528,-37.9121)-- + (97.1734,-18.3382,-15.6109)-- + cycle; + +snbDdcleft[8]= + (26.5588,28.6199,-92.0928)-- + (64.8161,33.4519,-68.4094)-- + (80.6249,-8.17712,-58.6781)-- + (51.8528,-37.9121,-76.4211)-- + (18.3382,-15.6109,-97.1734)-- + cycle; + +snbDdcleft[9]= + (-26.5588,-28.6199,-92.0928)-- + (-64.8161,-33.4519,-68.4094)-- + (-80.6249,8.17712,-58.6781)-- + (-51.8528,37.9121,-76.4211)-- + (-18.3382,15.6109,-97.1734)-- + cycle; + +snbDdcleft[10]= + (26.5588,-28.6199,92.0928)-- + (64.8161,-33.4519,68.4094)-- + (80.6249,8.17712,58.6781)-- + (51.8528,37.9121,76.4211)-- + (18.3382,15.6109,97.1734)-- + cycle; + +snbDdcleft[11]= + (-26.5588,28.6199,92.0928)-- + (-64.8161,33.4519,68.4094)-- + (-80.6249,-8.17712,58.6781)-- + (-51.8528,-37.9121,76.4211)-- + (-18.3382,-15.6109,97.1734)-- + cycle; + +snbDdcleft[12]= + (15.6109,-97.1734,-18.3382)-- + (58.6781,-80.6249,-8.17712)-- + (28.6199,-92.0928,26.5588)-- + cycle; + +snbDdcleft[13]= + (-15.6109,-97.1734,18.3382)-- + (-58.6781,-80.6249,8.17712)-- + (-28.6199,-92.0928,-26.5588)-- + cycle; + +snbDdcleft[14]= + (15.6109,97.1734,18.3382)-- + (58.6781,80.6249,8.17712)-- + (28.6199,92.0928,-26.5588)-- + cycle; + +snbDdcleft[15]= + (-15.6109,97.1734,-18.3382)-- + (-58.6781,80.6249,-8.17712)-- + (-28.6199,92.0928,26.5588)-- + cycle; + +snbDdcleft[16]= + (-97.1734,-18.3382,15.6109)-- + (-80.6249,-8.17712,58.6781)-- + (-92.0928,26.5588,28.6199)-- + cycle; + +snbDdcleft[17]= + (-97.1734,18.3382,-15.6109)-- + (-80.6249,8.17712,-58.6781)-- + (-92.0928,-26.5588,-28.6199)-- + cycle; + +snbDdcleft[18]= + (97.1734,18.3382,15.6109)-- + (80.6249,8.17712,58.6781)-- + (92.0928,-26.5588,28.6199)-- + cycle; + +snbDdcleft[19]= + (97.1734,-18.3382,-15.6109)-- + (80.6249,-8.17712,-58.6781)-- + (92.0928,26.5588,-28.6199)-- + cycle; + +snbDdcleft[20]= + (18.3382,-15.6109,-97.1734)-- + (8.17712,-58.6781,-80.6249)-- + (-26.5588,-28.6199,-92.0928)-- + cycle; + +snbDdcleft[21]= + (-18.3382,15.6109,-97.1734)-- + (-8.17712,58.6781,-80.6249)-- + (26.5588,28.6199,-92.0928)-- + cycle; + +snbDdcleft[22]= + (18.3382,15.6109,97.1734)-- + (8.17712,58.6781,80.6249)-- + (-26.5588,28.6199,92.0928)-- + cycle; + +snbDdcleft[23]= + (-18.3382,-15.6109,97.1734)-- + (-8.17712,-58.6781,80.6249)-- + (26.5588,-28.6199,92.0928)-- + cycle; + +snbDdcleft[24]= + (37.9121,-76.4211,-51.8528)-- + (51.8528,-37.9121,-76.4211)-- + (76.4211,-51.8528,-37.9121)-- + cycle; + +snbDdcleft[25]= + (33.4519,-68.4094,64.8161)-- + (68.4094,-64.8161,33.4519)-- + (64.8161,-33.4519,68.4094)-- + cycle; + +snbDdcleft[26]= + (-37.9121,-76.4211,51.8528)-- + (-51.8528,-37.9121,76.4211)-- + (-76.4211,-51.8528,37.9121)-- + cycle; + +snbDdcleft[27]= + (-68.4094,-64.8161,-33.4519)-- + (-64.8161,-33.4519,-68.4094)-- + (-33.4519,-68.4094,-64.8161)-- + cycle; + +snbDdcleft[28]= + (37.9121,76.4211,51.8528)-- + (51.8528,37.9121,76.4211)-- + (76.4211,51.8528,37.9121)-- + cycle; + +snbDdcleft[29]= + (33.4519,68.4094,-64.8161)-- + (68.4094,64.8161,-33.4519)-- + (64.8161,33.4519,-68.4094)-- + cycle; + +snbDdcleft[30]= + (-37.9121,76.4211,-51.8528)-- + (-51.8528,37.9121,-76.4211)-- + (-76.4211,51.8528,-37.9121)-- + cycle; + +snbDdcleft[31]= + (-68.4094,64.8161,33.4519)-- + (-64.8161,33.4519,68.4094)-- + (-33.4519,68.4094,64.8161)-- + cycle; + +snbDdcleft[32]= + (15.6109,-97.1734,-18.3382)-- + (58.6781,-80.6249,-8.17712)-- + (37.9121,-76.4211,-51.8528)-- + cycle; + +snbDdcleft[33]= + (76.4211,-51.8528,-37.9121)-- + (37.9121,-76.4211,-51.8528)-- + (58.6781,-80.6249,-8.17712)-- + cycle; + +snbDdcleft[34]= + (58.6781,-80.6249,-8.17712)-- + (28.6199,-92.0928,26.5588)-- + (68.4094,-64.8161,33.4519)-- + cycle; + +snbDdcleft[35]= + (33.4519,-68.4094,64.8161)-- + (68.4094,-64.8161,33.4519)-- + (28.6199,-92.0928,26.5588)-- + cycle; + +snbDdcleft[36]= + (-15.6109,-97.1734,18.3382)-- + (-58.6781,-80.6249,8.17712)-- + (-37.9121,-76.4211,51.8528)-- + cycle; + +snbDdcleft[37]= + (-76.4211,-51.8528,37.9121)-- + (-37.9121,-76.4211,51.8528)-- + (-58.6781,-80.6249,8.17712)-- + cycle; + +snbDdcleft[38]= + (-58.6781,-80.6249,8.17712)-- + (-28.6199,-92.0928,-26.5588)-- + (-68.4094,-64.8161,-33.4519)-- + cycle; + +snbDdcleft[39]= + (-33.4519,-68.4094,-64.8161)-- + (-68.4094,-64.8161,-33.4519)-- + (-28.6199,-92.0928,-26.5588)-- + cycle; + +snbDdcleft[40]= + (15.6109,97.1734,18.3382)-- + (58.6781,80.6249,8.17712)-- + (37.9121,76.4211,51.8528)-- + cycle; + +snbDdcleft[41]= + (76.4211,51.8528,37.9121)-- + (37.9121,76.4211,51.8528)-- + (58.6781,80.6249,8.17712)-- + cycle; + +snbDdcleft[42]= + (58.6781,80.6249,8.17712)-- + (28.6199,92.0928,-26.5588)-- + (68.4094,64.8161,-33.4519)-- + cycle; + +snbDdcleft[43]= + (33.4519,68.4094,-64.8161)-- + (68.4094,64.8161,-33.4519)-- + (28.6199,92.0928,-26.5588)-- + cycle; + +snbDdcleft[44]= + (-15.6109,97.1734,-18.3382)-- + (-58.6781,80.6249,-8.17712)-- + (-37.9121,76.4211,-51.8528)-- + cycle; + +snbDdcleft[45]= + (-76.4211,51.8528,-37.9121)-- + (-37.9121,76.4211,-51.8528)-- + (-58.6781,80.6249,-8.17712)-- + cycle; + +snbDdcleft[46]= + (-58.6781,80.6249,-8.17712)-- + (-28.6199,92.0928,26.5588)-- + (-68.4094,64.8161,33.4519)-- + cycle; + +snbDdcleft[47]= + (-33.4519,68.4094,64.8161)-- + (-68.4094,64.8161,33.4519)-- + (-28.6199,92.0928,26.5588)-- + cycle; + +snbDdcleft[48]= + (-97.1734,-18.3382,15.6109)-- + (-80.6249,-8.17712,58.6781)-- + (-76.4211,-51.8528,37.9121)-- + cycle; + +snbDdcleft[49]= + (-51.8528,-37.9121,76.4211)-- + (-76.4211,-51.8528,37.9121)-- + (-80.6249,-8.17712,58.6781)-- + cycle; + +snbDdcleft[50]= + (-80.6249,-8.17712,58.6781)-- + (-92.0928,26.5588,28.6199)-- + (-64.8161,33.4519,68.4094)-- + cycle; + +snbDdcleft[51]= + (-68.4094,64.8161,33.4519)-- + (-64.8161,33.4519,68.4094)-- + (-92.0928,26.5588,28.6199)-- + cycle; + +snbDdcleft[52]= + (-97.1734,18.3382,-15.6109)-- + (-80.6249,8.17712,-58.6781)-- + (-76.4211,51.8528,-37.9121)-- + cycle; + +snbDdcleft[53]= + (-51.8528,37.9121,-76.4211)-- + (-76.4211,51.8528,-37.9121)-- + (-80.6249,8.17712,-58.6781)-- + cycle; + +snbDdcleft[54]= + (-80.6249,8.17712,-58.6781)-- + (-92.0928,-26.5588,-28.6199)-- + (-64.8161,-33.4519,-68.4094)-- + cycle; + +snbDdcleft[55]= + (-68.4094,-64.8161,-33.4519)-- + (-64.8161,-33.4519,-68.4094)-- + (-92.0928,-26.5588,-28.6199)-- + cycle; + +snbDdcleft[56]= + (97.1734,18.3382,15.6109)-- + (80.6249,8.17712,58.6781)-- + (76.4211,51.8528,37.9121)-- + cycle; + +snbDdcleft[57]= + (51.8528,37.9121,76.4211)-- + (76.4211,51.8528,37.9121)-- + (80.6249,8.17712,58.6781)-- + cycle; + +snbDdcleft[58]= + (80.6249,8.17712,58.6781)-- + (92.0928,-26.5588,28.6199)-- + (64.8161,-33.4519,68.4094)-- + cycle; + +snbDdcleft[59]= + (68.4094,-64.8161,33.4519)-- + (64.8161,-33.4519,68.4094)-- + (92.0928,-26.5588,28.6199)-- + cycle; + +snbDdcleft[60]= + (97.1734,-18.3382,-15.6109)-- + (80.6249,-8.17712,-58.6781)-- + (76.4211,-51.8528,-37.9121)-- + cycle; + +snbDdcleft[61]= + (51.8528,-37.9121,-76.4211)-- + (76.4211,-51.8528,-37.9121)-- + (80.6249,-8.17712,-58.6781)-- + cycle; + +snbDdcleft[62]= + (80.6249,-8.17712,-58.6781)-- + (92.0928,26.5588,-28.6199)-- + (64.8161,33.4519,-68.4094)-- + cycle; + +snbDdcleft[63]= + (68.4094,64.8161,-33.4519)-- + (64.8161,33.4519,-68.4094)-- + (92.0928,26.5588,-28.6199)-- + cycle; + +snbDdcleft[64]= + (18.3382,-15.6109,-97.1734)-- + (8.17712,-58.6781,-80.6249)-- + (51.8528,-37.9121,-76.4211)-- + cycle; + +snbDdcleft[65]= + (37.9121,-76.4211,-51.8528)-- + (51.8528,-37.9121,-76.4211)-- + (8.17712,-58.6781,-80.6249)-- + cycle; + +snbDdcleft[66]= + (8.17712,-58.6781,-80.6249)-- + (-26.5588,-28.6199,-92.0928)-- + (-33.4519,-68.4094,-64.8161)-- + cycle; + +snbDdcleft[67]= + (-64.8161,-33.4519,-68.4094)-- + (-33.4519,-68.4094,-64.8161)-- + (-26.5588,-28.6199,-92.0928)-- + cycle; + +snbDdcleft[68]= + (-18.3382,15.6109,-97.1734)-- + (-8.17712,58.6781,-80.6249)-- + (-51.8528,37.9121,-76.4211)-- + cycle; + +snbDdcleft[69]= + (-37.9121,76.4211,-51.8528)-- + (-51.8528,37.9121,-76.4211)-- + (-8.17712,58.6781,-80.6249)-- + cycle; + +snbDdcleft[70]= + (-8.17712,58.6781,-80.6249)-- + (26.5588,28.6199,-92.0928)-- + (33.4519,68.4094,-64.8161)-- + cycle; + +snbDdcleft[71]= + (64.8161,33.4519,-68.4094)-- + (33.4519,68.4094,-64.8161)-- + (26.5588,28.6199,-92.0928)-- + cycle; + +snbDdcleft[72]= + (18.3382,15.6109,97.1734)-- + (8.17712,58.6781,80.6249)-- + (51.8528,37.9121,76.4211)-- + cycle; + +snbDdcleft[73]= + (37.9121,76.4211,51.8528)-- + (51.8528,37.9121,76.4211)-- + (8.17712,58.6781,80.6249)-- + cycle; + +snbDdcleft[74]= + (8.17712,58.6781,80.6249)-- + (-26.5588,28.6199,92.0928)-- + (-33.4519,68.4094,64.8161)-- + cycle; + +snbDdcleft[75]= + (-64.8161,33.4519,68.4094)-- + (-33.4519,68.4094,64.8161)-- + (-26.5588,28.6199,92.0928)-- + cycle; + +snbDdcleft[76]= + (-18.3382,-15.6109,97.1734)-- + (-8.17712,-58.6781,80.6249)-- + (-51.8528,-37.9121,76.4211)-- + cycle; + +snbDdcleft[77]= + (-37.9121,-76.4211,51.8528)-- + (-51.8528,-37.9121,76.4211)-- + (-8.17712,-58.6781,80.6249)-- + cycle; + +snbDdcleft[78]= + (-8.17712,-58.6781,80.6249)-- + (26.5588,-28.6199,92.0928)-- + (33.4519,-68.4094,64.8161)-- + cycle; + +snbDdcleft[79]= + (64.8161,-33.4519,68.4094)-- + (33.4519,-68.4094,64.8161)-- + (26.5588,-28.6199,92.0928)-- + cycle; + +snbDdcleft[80]= + (-28.6199,-92.0928,-26.5588)-- + (-15.6109,-97.1734,18.3382)-- + (15.6109,-97.1734,-18.3382)-- + cycle; + +snbDdcleft[81]= + (28.6199,-92.0928,26.5588)-- + (15.6109,-97.1734,-18.3382)-- + (-15.6109,-97.1734,18.3382)-- + cycle; + +snbDdcleft[82]= + (-28.6199,92.0928,26.5588)-- + (-15.6109,97.1734,-18.3382)-- + (15.6109,97.1734,18.3382)-- + cycle; + +snbDdcleft[83]= + (28.6199,92.0928,-26.5588)-- + (15.6109,97.1734,18.3382)-- + (-15.6109,97.1734,-18.3382)-- + cycle; + +snbDdcleft[84]= + (-92.0928,-26.5588,-28.6199)-- + (-97.1734,18.3382,-15.6109)-- + (-97.1734,-18.3382,15.6109)-- + cycle; + +snbDdcleft[85]= + (-92.0928,26.5588,28.6199)-- + (-97.1734,-18.3382,15.6109)-- + (-97.1734,18.3382,-15.6109)-- + cycle; + +snbDdcleft[86]= + (92.0928,26.5588,-28.6199)-- + (97.1734,-18.3382,-15.6109)-- + (97.1734,18.3382,15.6109)-- + cycle; + +snbDdcleft[87]= + (92.0928,-26.5588,28.6199)-- + (97.1734,18.3382,15.6109)-- + (97.1734,-18.3382,-15.6109)-- + cycle; + +snbDdcleft[88]= + (26.5588,28.6199,-92.0928)-- + (-18.3382,15.6109,-97.1734)-- + (18.3382,-15.6109,-97.1734)-- + cycle; + +snbDdcleft[89]= + (-26.5588,-28.6199,-92.0928)-- + (18.3382,-15.6109,-97.1734)-- + (-18.3382,15.6109,-97.1734)-- + cycle; + +snbDdcleft[90]= + (26.5588,-28.6199,92.0928)-- + (-18.3382,-15.6109,97.1734)-- + (18.3382,15.6109,97.1734)-- + cycle; + +snbDdcleft[91]= + (-26.5588,28.6199,92.0928)-- + (18.3382,15.6109,97.1734)-- + (-18.3382,-15.6109,97.1734)-- + cycle; +snbDdcleft=scale3(1/abs(point(snbDdcleft[0],0)))*snbDdcleft; + +//*** end of snbDdcleft *** + +//*** start of snbDdcright *** +snbDdcright[0]= + (-28.6199,92.0928,-26.5588)-- + (-33.4519,68.4094,-64.8161)-- + (8.17712,58.6781,-80.6249)-- + (37.9121,76.4211,-51.8528)-- + (15.6109,97.1734,-18.3382)-- + cycle; + +snbDdcright[1]= + (28.6199,92.0928,26.5588)-- + (33.4519,68.4094,64.8161)-- + (-8.17712,58.6781,80.6249)-- + (-37.9121,76.4211,51.8528)-- + (-15.6109,97.1734,18.3382)-- + cycle; + +snbDdcright[2]= + (-28.6199,-92.0928,26.5588)-- + (-33.4519,-68.4094,64.8161)-- + (8.17712,-58.6781,80.6249)-- + (37.9121,-76.4211,51.8528)-- + (15.6109,-97.1734,18.3382)-- + cycle; + +snbDdcright[3]= + (28.6199,-92.0928,-26.5588)-- + (33.4519,-68.4094,-64.8161)-- + (-8.17712,-58.6781,-80.6249)-- + (-37.9121,-76.4211,-51.8528)-- + (-15.6109,-97.1734,-18.3382)-- + cycle; + +snbDdcright[4]= + (-92.0928,26.5588,-28.6199)-- + (-68.4094,64.8161,-33.4519)-- + (-58.6781,80.6249,8.17712)-- + (-76.4211,51.8528,37.9121)-- + (-97.1734,18.3382,15.6109)-- + cycle; + +snbDdcright[5]= + (-92.0928,-26.5588,28.6199)-- + (-68.4094,-64.8161,33.4519)-- + (-58.6781,-80.6249,-8.17712)-- + (-76.4211,-51.8528,-37.9121)-- + (-97.1734,-18.3382,-15.6109)-- + cycle; + +snbDdcright[6]= + (92.0928,-26.5588,-28.6199)-- + (68.4094,-64.8161,-33.4519)-- + (58.6781,-80.6249,8.17712)-- + (76.4211,-51.8528,37.9121)-- + (97.1734,-18.3382,15.6109)-- + cycle; + +snbDdcright[7]= + (92.0928,26.5588,28.6199)-- + (68.4094,64.8161,33.4519)-- + (58.6781,80.6249,-8.17712)-- + (76.4211,51.8528,-37.9121)-- + (97.1734,18.3382,-15.6109)-- + cycle; + +snbDdcright[8]= + (26.5588,-28.6199,-92.0928)-- + (64.8161,-33.4519,-68.4094)-- + (80.6249,8.17712,-58.6781)-- + (51.8528,37.9121,-76.4211)-- + (18.3382,15.6109,-97.1734)-- + cycle; + +snbDdcright[9]= + (-26.5588,28.6199,-92.0928)-- + (-64.8161,33.4519,-68.4094)-- + (-80.6249,-8.17712,-58.6781)-- + (-51.8528,-37.9121,-76.4211)-- + (-18.3382,-15.6109,-97.1734)-- + cycle; + +snbDdcright[10]= + (26.5588,28.6199,92.0928)-- + (64.8161,33.4519,68.4094)-- + (80.6249,-8.17712,58.6781)-- + (51.8528,-37.9121,76.4211)-- + (18.3382,-15.6109,97.1734)-- + cycle; + +snbDdcright[11]= + (-26.5588,-28.6199,92.0928)-- + (-64.8161,-33.4519,68.4094)-- + (-80.6249,8.17712,58.6781)-- + (-51.8528,37.9121,76.4211)-- + (-18.3382,15.6109,97.1734)-- + cycle; + +snbDdcright[12]= + (15.6109,97.1734,-18.3382)-- + (58.6781,80.6249,-8.17712)-- + (28.6199,92.0928,26.5588)-- + cycle; + +snbDdcright[13]= + (-15.6109,97.1734,18.3382)-- + (-58.6781,80.6249,8.17712)-- + (-28.6199,92.0928,-26.5588)-- + cycle; + +snbDdcright[14]= + (15.6109,-97.1734,18.3382)-- + (58.6781,-80.6249,8.17712)-- + (28.6199,-92.0928,-26.5588)-- + cycle; + +snbDdcright[15]= + (-15.6109,-97.1734,-18.3382)-- + (-58.6781,-80.6249,-8.17712)-- + (-28.6199,-92.0928,26.5588)-- + cycle; + +snbDdcright[16]= + (-97.1734,18.3382,15.6109)-- + (-80.6249,8.17712,58.6781)-- + (-92.0928,-26.5588,28.6199)-- + cycle; + +snbDdcright[17]= + (-97.1734,-18.3382,-15.6109)-- + (-80.6249,-8.17712,-58.6781)-- + (-92.0928,26.5588,-28.6199)-- + cycle; + +snbDdcright[18]= + (97.1734,-18.3382,15.6109)-- + (80.6249,-8.17712,58.6781)-- + (92.0928,26.5588,28.6199)-- + cycle; + +snbDdcright[19]= + (97.1734,18.3382,-15.6109)-- + (80.6249,8.17712,-58.6781)-- + (92.0928,-26.5588,-28.6199)-- + cycle; + +snbDdcright[20]= + (18.3382,15.6109,-97.1734)-- + (8.17712,58.6781,-80.6249)-- + (-26.5588,28.6199,-92.0928)-- + cycle; + +snbDdcright[21]= + (-18.3382,-15.6109,-97.1734)-- + (-8.17712,-58.6781,-80.6249)-- + (26.5588,-28.6199,-92.0928)-- + cycle; + +snbDdcright[22]= + (18.3382,-15.6109,97.1734)-- + (8.17712,-58.6781,80.6249)-- + (-26.5588,-28.6199,92.0928)-- + cycle; + +snbDdcright[23]= + (-18.3382,15.6109,97.1734)-- + (-8.17712,58.6781,80.6249)-- + (26.5588,28.6199,92.0928)-- + cycle; + +snbDdcright[24]= + (37.9121,76.4211,-51.8528)-- + (51.8528,37.9121,-76.4211)-- + (76.4211,51.8528,-37.9121)-- + cycle; + +snbDdcright[25]= + (33.4519,68.4094,64.8161)-- + (68.4094,64.8161,33.4519)-- + (64.8161,33.4519,68.4094)-- + cycle; + +snbDdcright[26]= + (-37.9121,76.4211,51.8528)-- + (-51.8528,37.9121,76.4211)-- + (-76.4211,51.8528,37.9121)-- + cycle; + +snbDdcright[27]= + (-68.4094,64.8161,-33.4519)-- + (-64.8161,33.4519,-68.4094)-- + (-33.4519,68.4094,-64.8161)-- + cycle; + +snbDdcright[28]= + (37.9121,-76.4211,51.8528)-- + (51.8528,-37.9121,76.4211)-- + (76.4211,-51.8528,37.9121)-- + cycle; + +snbDdcright[29]= + (33.4519,-68.4094,-64.8161)-- + (68.4094,-64.8161,-33.4519)-- + (64.8161,-33.4519,-68.4094)-- + cycle; + +snbDdcright[30]= + (-37.9121,-76.4211,-51.8528)-- + (-51.8528,-37.9121,-76.4211)-- + (-76.4211,-51.8528,-37.9121)-- + cycle; + +snbDdcright[31]= + (-68.4094,-64.8161,33.4519)-- + (-64.8161,-33.4519,68.4094)-- + (-33.4519,-68.4094,64.8161)-- + cycle; + +snbDdcright[32]= + (15.6109,97.1734,-18.3382)-- + (58.6781,80.6249,-8.17712)-- + (37.9121,76.4211,-51.8528)-- + cycle; + +snbDdcright[33]= + (76.4211,51.8528,-37.9121)-- + (37.9121,76.4211,-51.8528)-- + (58.6781,80.6249,-8.17712)-- + cycle; + +snbDdcright[34]= + (58.6781,80.6249,-8.17712)-- + (28.6199,92.0928,26.5588)-- + (68.4094,64.8161,33.4519)-- + cycle; + +snbDdcright[35]= + (33.4519,68.4094,64.8161)-- + (68.4094,64.8161,33.4519)-- + (28.6199,92.0928,26.5588)-- + cycle; + +snbDdcright[36]= + (-15.6109,97.1734,18.3382)-- + (-58.6781,80.6249,8.17712)-- + (-37.9121,76.4211,51.8528)-- + cycle; + +snbDdcright[37]= + (-76.4211,51.8528,37.9121)-- + (-37.9121,76.4211,51.8528)-- + (-58.6781,80.6249,8.17712)-- + cycle; + +snbDdcright[38]= + (-58.6781,80.6249,8.17712)-- + (-28.6199,92.0928,-26.5588)-- + (-68.4094,64.8161,-33.4519)-- + cycle; + +snbDdcright[39]= + (-33.4519,68.4094,-64.8161)-- + (-68.4094,64.8161,-33.4519)-- + (-28.6199,92.0928,-26.5588)-- + cycle; + +snbDdcright[40]= + (15.6109,-97.1734,18.3382)-- + (58.6781,-80.6249,8.17712)-- + (37.9121,-76.4211,51.8528)-- + cycle; + +snbDdcright[41]= + (76.4211,-51.8528,37.9121)-- + (37.9121,-76.4211,51.8528)-- + (58.6781,-80.6249,8.17712)-- + cycle; + +snbDdcright[42]= + (58.6781,-80.6249,8.17712)-- + (28.6199,-92.0928,-26.5588)-- + (68.4094,-64.8161,-33.4519)-- + cycle; + +snbDdcright[43]= + (33.4519,-68.4094,-64.8161)-- + (68.4094,-64.8161,-33.4519)-- + (28.6199,-92.0928,-26.5588)-- + cycle; + +snbDdcright[44]= + (-15.6109,-97.1734,-18.3382)-- + (-58.6781,-80.6249,-8.17712)-- + (-37.9121,-76.4211,-51.8528)-- + cycle; + +snbDdcright[45]= + (-76.4211,-51.8528,-37.9121)-- + (-37.9121,-76.4211,-51.8528)-- + (-58.6781,-80.6249,-8.17712)-- + cycle; + +snbDdcright[46]= + (-58.6781,-80.6249,-8.17712)-- + (-28.6199,-92.0928,26.5588)-- + (-68.4094,-64.8161,33.4519)-- + cycle; + +snbDdcright[47]= + (-33.4519,-68.4094,64.8161)-- + (-68.4094,-64.8161,33.4519)-- + (-28.6199,-92.0928,26.5588)-- + cycle; + +snbDdcright[48]= + (-97.1734,18.3382,15.6109)-- + (-80.6249,8.17712,58.6781)-- + (-76.4211,51.8528,37.9121)-- + cycle; + +snbDdcright[49]= + (-51.8528,37.9121,76.4211)-- + (-76.4211,51.8528,37.9121)-- + (-80.6249,8.17712,58.6781)-- + cycle; + +snbDdcright[50]= + (-80.6249,8.17712,58.6781)-- + (-92.0928,-26.5588,28.6199)-- + (-64.8161,-33.4519,68.4094)-- + cycle; + +snbDdcright[51]= + (-68.4094,-64.8161,33.4519)-- + (-64.8161,-33.4519,68.4094)-- + (-92.0928,-26.5588,28.6199)-- + cycle; + +snbDdcright[52]= + (-97.1734,-18.3382,-15.6109)-- + (-80.6249,-8.17712,-58.6781)-- + (-76.4211,-51.8528,-37.9121)-- + cycle; + +snbDdcright[53]= + (-51.8528,-37.9121,-76.4211)-- + (-76.4211,-51.8528,-37.9121)-- + (-80.6249,-8.17712,-58.6781)-- + cycle; + +snbDdcright[54]= + (-80.6249,-8.17712,-58.6781)-- + (-92.0928,26.5588,-28.6199)-- + (-64.8161,33.4519,-68.4094)-- + cycle; + +snbDdcright[55]= + (-68.4094,64.8161,-33.4519)-- + (-64.8161,33.4519,-68.4094)-- + (-92.0928,26.5588,-28.6199)-- + cycle; + +snbDdcright[56]= + (97.1734,-18.3382,15.6109)-- + (80.6249,-8.17712,58.6781)-- + (76.4211,-51.8528,37.9121)-- + cycle; + +snbDdcright[57]= + (51.8528,-37.9121,76.4211)-- + (76.4211,-51.8528,37.9121)-- + (80.6249,-8.17712,58.6781)-- + cycle; + +snbDdcright[58]= + (80.6249,-8.17712,58.6781)-- + (92.0928,26.5588,28.6199)-- + (64.8161,33.4519,68.4094)-- + cycle; + +snbDdcright[59]= + (68.4094,64.8161,33.4519)-- + (64.8161,33.4519,68.4094)-- + (92.0928,26.5588,28.6199)-- + cycle; + +snbDdcright[60]= + (97.1734,18.3382,-15.6109)-- + (80.6249,8.17712,-58.6781)-- + (76.4211,51.8528,-37.9121)-- + cycle; + +snbDdcright[61]= + (51.8528,37.9121,-76.4211)-- + (76.4211,51.8528,-37.9121)-- + (80.6249,8.17712,-58.6781)-- + cycle; + +snbDdcright[62]= + (80.6249,8.17712,-58.6781)-- + (92.0928,-26.5588,-28.6199)-- + (64.8161,-33.4519,-68.4094)-- + cycle; + +snbDdcright[63]= + (68.4094,-64.8161,-33.4519)-- + (64.8161,-33.4519,-68.4094)-- + (92.0928,-26.5588,-28.6199)-- + cycle; + +snbDdcright[64]= + (18.3382,15.6109,-97.1734)-- + (8.17712,58.6781,-80.6249)-- + (51.8528,37.9121,-76.4211)-- + cycle; + +snbDdcright[65]= + (37.9121,76.4211,-51.8528)-- + (51.8528,37.9121,-76.4211)-- + (8.17712,58.6781,-80.6249)-- + cycle; + +snbDdcright[66]= + (8.17712,58.6781,-80.6249)-- + (-26.5588,28.6199,-92.0928)-- + (-33.4519,68.4094,-64.8161)-- + cycle; + +snbDdcright[67]= + (-64.8161,33.4519,-68.4094)-- + (-33.4519,68.4094,-64.8161)-- + (-26.5588,28.6199,-92.0928)-- + cycle; + +snbDdcright[68]= + (-18.3382,-15.6109,-97.1734)-- + (-8.17712,-58.6781,-80.6249)-- + (-51.8528,-37.9121,-76.4211)-- + cycle; + +snbDdcright[69]= + (-37.9121,-76.4211,-51.8528)-- + (-51.8528,-37.9121,-76.4211)-- + (-8.17712,-58.6781,-80.6249)-- + cycle; + +snbDdcright[70]= + (-8.17712,-58.6781,-80.6249)-- + (26.5588,-28.6199,-92.0928)-- + (33.4519,-68.4094,-64.8161)-- + cycle; + +snbDdcright[71]= + (64.8161,-33.4519,-68.4094)-- + (33.4519,-68.4094,-64.8161)-- + (26.5588,-28.6199,-92.0928)-- + cycle; + +snbDdcright[72]= + (18.3382,-15.6109,97.1734)-- + (8.17712,-58.6781,80.6249)-- + (51.8528,-37.9121,76.4211)-- + cycle; + +snbDdcright[73]= + (37.9121,-76.4211,51.8528)-- + (51.8528,-37.9121,76.4211)-- + (8.17712,-58.6781,80.6249)-- + cycle; + +snbDdcright[74]= + (8.17712,-58.6781,80.6249)-- + (-26.5588,-28.6199,92.0928)-- + (-33.4519,-68.4094,64.8161)-- + cycle; + +snbDdcright[75]= + (-64.8161,-33.4519,68.4094)-- + (-33.4519,-68.4094,64.8161)-- + (-26.5588,-28.6199,92.0928)-- + cycle; + +snbDdcright[76]= + (-18.3382,15.6109,97.1734)-- + (-8.17712,58.6781,80.6249)-- + (-51.8528,37.9121,76.4211)-- + cycle; + +snbDdcright[77]= + (-37.9121,76.4211,51.8528)-- + (-51.8528,37.9121,76.4211)-- + (-8.17712,58.6781,80.6249)-- + cycle; + +snbDdcright[78]= + (-8.17712,58.6781,80.6249)-- + (26.5588,28.6199,92.0928)-- + (33.4519,68.4094,64.8161)-- + cycle; + +snbDdcright[79]= + (64.8161,33.4519,68.4094)-- + (33.4519,68.4094,64.8161)-- + (26.5588,28.6199,92.0928)-- + cycle; + +snbDdcright[80]= + (-28.6199,92.0928,-26.5588)-- + (-15.6109,97.1734,18.3382)-- + (15.6109,97.1734,-18.3382)-- + cycle; + +snbDdcright[81]= + (28.6199,92.0928,26.5588)-- + (15.6109,97.1734,-18.3382)-- + (-15.6109,97.1734,18.3382)-- + cycle; + +snbDdcright[82]= + (-28.6199,-92.0928,26.5588)-- + (-15.6109,-97.1734,-18.3382)-- + (15.6109,-97.1734,18.3382)-- + cycle; + +snbDdcright[83]= + (28.6199,-92.0928,-26.5588)-- + (15.6109,-97.1734,18.3382)-- + (-15.6109,-97.1734,-18.3382)-- + cycle; + +snbDdcright[84]= + (-92.0928,26.5588,-28.6199)-- + (-97.1734,-18.3382,-15.6109)-- + (-97.1734,18.3382,15.6109)-- + cycle; + +snbDdcright[85]= + (-92.0928,-26.5588,28.6199)-- + (-97.1734,18.3382,15.6109)-- + (-97.1734,-18.3382,-15.6109)-- + cycle; + +snbDdcright[86]= + (92.0928,-26.5588,-28.6199)-- + (97.1734,18.3382,-15.6109)-- + (97.1734,-18.3382,15.6109)-- + cycle; + +snbDdcright[87]= + (92.0928,26.5588,28.6199)-- + (97.1734,-18.3382,15.6109)-- + (97.1734,18.3382,-15.6109)-- + cycle; + +snbDdcright[88]= + (26.5588,-28.6199,-92.0928)-- + (-18.3382,-15.6109,-97.1734)-- + (18.3382,15.6109,-97.1734)-- + cycle; + +snbDdcright[89]= + (-26.5588,28.6199,-92.0928)-- + (18.3382,15.6109,-97.1734)-- + (-18.3382,-15.6109,-97.1734)-- + cycle; + +snbDdcright[90]= + (26.5588,28.6199,92.0928)-- + (-18.3382,15.6109,97.1734)-- + (18.3382,-15.6109,97.1734)-- + cycle; + +snbDdcright[91]= + (-26.5588,-28.6199,92.0928)-- + (18.3382,-15.6109,97.1734)-- + (-18.3382,15.6109,97.1734)-- + cycle; +snbDdcright=scale3(1/abs(point(snbDdcright[0],0)))*snbDdcright; + +//*** end of snbDdcright *** + +//*** start of greatRhombicosDodec *** +greatRhombicosDodec[0]= + (-13.1496,-98.2558,-13.1496)-- + (-34.4262,-90.1289,-26.2992)-- + (-42.5531,-76.9792,-47.5758)-- + (-34.4262,-63.8296,-68.8523)-- + (-13.1496,-55.7027,-82.0019)-- + (13.1496,-55.7027,-82.0019)-- + (34.4262,-63.8296,-68.8523)-- + (42.5531,-76.9792,-47.5758)-- + (34.4262,-90.1289,-26.2992)-- + (13.1496,-98.2558,-13.1496)-- + cycle; + +greatRhombicosDodec[1]= + (13.1496,-98.2558,13.1496)-- + (34.4262,-90.1289,26.2992)-- + (42.5531,-76.9792,47.5758)-- + (34.4262,-63.8296,68.8523)-- + (13.1496,-55.7027,82.0019)-- + (-13.1496,-55.7027,82.0019)-- + (-34.4262,-63.8296,68.8523)-- + (-42.5531,-76.9792,47.5758)-- + (-34.4262,-90.1289,26.2992)-- + (-13.1496,-98.2558,13.1496)-- + cycle; + +greatRhombicosDodec[2]= + (-13.1496,98.2558,13.1496)-- + (-34.4262,90.1289,26.2992)-- + (-42.5531,76.9792,47.5758)-- + (-34.4262,63.8296,68.8523)-- + (-13.1496,55.7027,82.0019)-- + (13.1496,55.7027,82.0019)-- + (34.4262,63.8296,68.8523)-- + (42.5531,76.9792,47.5758)-- + (34.4262,90.1289,26.2992)-- + (13.1496,98.2558,13.1496)-- + cycle; + +greatRhombicosDodec[3]= + (13.1496,98.2558,-13.1496)-- + (34.4262,90.1289,-26.2992)-- + (42.5531,76.9792,-47.5758)-- + (34.4262,63.8296,-68.8523)-- + (13.1496,55.7027,-82.0019)-- + (-13.1496,55.7027,-82.0019)-- + (-34.4262,63.8296,-68.8523)-- + (-42.5531,76.9792,-47.5758)-- + (-34.4262,90.1289,-26.2992)-- + (-13.1496,98.2558,-13.1496)-- + cycle; + +greatRhombicosDodec[4]= + (-98.2558,-13.1496,-13.1496)-- + (-90.1289,-26.2992,-34.4262)-- + (-76.9792,-47.5758,-42.5531)-- + (-63.8296,-68.8523,-34.4262)-- + (-55.7027,-82.0019,-13.1496)-- + (-55.7027,-82.0019,13.1496)-- + (-63.8296,-68.8523,34.4262)-- + (-76.9792,-47.5758,42.5531)-- + (-90.1289,-26.2992,34.4262)-- + (-98.2558,-13.1496,13.1496)-- + cycle; + +greatRhombicosDodec[5]= + (-98.2558,13.1496,13.1496)-- + (-90.1289,26.2992,34.4262)-- + (-76.9792,47.5758,42.5531)-- + (-63.8296,68.8523,34.4262)-- + (-55.7027,82.0019,13.1496)-- + (-55.7027,82.0019,-13.1496)-- + (-63.8296,68.8523,-34.4262)-- + (-76.9792,47.5758,-42.5531)-- + (-90.1289,26.2992,-34.4262)-- + (-98.2558,13.1496,-13.1496)-- + cycle; + +greatRhombicosDodec[6]= + (98.2558,13.1496,-13.1496)-- + (90.1289,26.2992,-34.4262)-- + (76.9792,47.5758,-42.5531)-- + (63.8296,68.8523,-34.4262)-- + (55.7027,82.0019,-13.1496)-- + (55.7027,82.0019,13.1496)-- + (63.8296,68.8523,34.4262)-- + (76.9792,47.5758,42.5531)-- + (90.1289,26.2992,34.4262)-- + (98.2558,13.1496,13.1496)-- + cycle; + +greatRhombicosDodec[7]= + (98.2558,-13.1496,13.1496)-- + (90.1289,-26.2992,34.4262)-- + (76.9792,-47.5758,42.5531)-- + (63.8296,-68.8523,34.4262)-- + (55.7027,-82.0019,13.1496)-- + (55.7027,-82.0019,-13.1496)-- + (63.8296,-68.8523,-34.4262)-- + (76.9792,-47.5758,-42.5531)-- + (90.1289,-26.2992,-34.4262)-- + (98.2558,-13.1496,-13.1496)-- + cycle; + +greatRhombicosDodec[8]= + (13.1496,13.1496,-98.2558)-- + (26.2992,34.4262,-90.1289)-- + (47.5758,42.5531,-76.9792)-- + (68.8523,34.4262,-63.8296)-- + (82.0019,13.1496,-55.7027)-- + (82.0019,-13.1496,-55.7027)-- + (68.8523,-34.4262,-63.8296)-- + (47.5758,-42.5531,-76.9792)-- + (26.2992,-34.4262,-90.1289)-- + (13.1496,-13.1496,-98.2558)-- + cycle; + +greatRhombicosDodec[9]= + (-13.1496,-13.1496,-98.2558)-- + (-26.2992,-34.4262,-90.1289)-- + (-47.5758,-42.5531,-76.9792)-- + (-68.8523,-34.4262,-63.8296)-- + (-82.0019,-13.1496,-55.7027)-- + (-82.0019,13.1496,-55.7027)-- + (-68.8523,34.4262,-63.8296)-- + (-47.5758,42.5531,-76.9792)-- + (-26.2992,34.4262,-90.1289)-- + (-13.1496,13.1496,-98.2558)-- + cycle; + +greatRhombicosDodec[10]= + (13.1496,-13.1496,98.2558)-- + (26.2992,-34.4262,90.1289)-- + (47.5758,-42.5531,76.9792)-- + (68.8523,-34.4262,63.8296)-- + (82.0019,-13.1496,55.7027)-- + (82.0019,13.1496,55.7027)-- + (68.8523,34.4262,63.8296)-- + (47.5758,42.5531,76.9792)-- + (26.2992,34.4262,90.1289)-- + (13.1496,13.1496,98.2558)-- + cycle; + +greatRhombicosDodec[11]= + (-13.1496,13.1496,98.2558)-- + (-26.2992,34.4262,90.1289)-- + (-47.5758,42.5531,76.9792)-- + (-68.8523,34.4262,63.8296)-- + (-82.0019,13.1496,55.7027)-- + (-82.0019,-13.1496,55.7027)-- + (-68.8523,-34.4262,63.8296)-- + (-47.5758,-42.5531,76.9792)-- + (-26.2992,-34.4262,90.1289)-- + (-13.1496,-13.1496,98.2558)-- + cycle; + +greatRhombicosDodec[12]= + (34.4262,-90.1289,-26.2992)-- + (13.1496,-98.2558,-13.1496)-- + (13.1496,-98.2558,13.1496)-- + (34.4262,-90.1289,26.2992)-- + (55.7027,-82.0019,13.1496)-- + (55.7027,-82.0019,-13.1496)-- + cycle; + +greatRhombicosDodec[13]= + (-34.4262,-90.1289,26.2992)-- + (-13.1496,-98.2558,13.1496)-- + (-13.1496,-98.2558,-13.1496)-- + (-34.4262,-90.1289,-26.2992)-- + (-55.7027,-82.0019,-13.1496)-- + (-55.7027,-82.0019,13.1496)-- + cycle; + +greatRhombicosDodec[14]= + (34.4262,90.1289,26.2992)-- + (13.1496,98.2558,13.1496)-- + (13.1496,98.2558,-13.1496)-- + (34.4262,90.1289,-26.2992)-- + (55.7027,82.0019,-13.1496)-- + (55.7027,82.0019,13.1496)-- + cycle; + +greatRhombicosDodec[15]= + (-34.4262,90.1289,-26.2992)-- + (-13.1496,98.2558,-13.1496)-- + (-13.1496,98.2558,13.1496)-- + (-34.4262,90.1289,26.2992)-- + (-55.7027,82.0019,13.1496)-- + (-55.7027,82.0019,-13.1496)-- + cycle; + +greatRhombicosDodec[16]= + (-90.1289,-26.2992,34.4262)-- + (-98.2558,-13.1496,13.1496)-- + (-98.2558,13.1496,13.1496)-- + (-90.1289,26.2992,34.4262)-- + (-82.0019,13.1496,55.7027)-- + (-82.0019,-13.1496,55.7027)-- + cycle; + +greatRhombicosDodec[17]= + (-90.1289,26.2992,-34.4262)-- + (-98.2558,13.1496,-13.1496)-- + (-98.2558,-13.1496,-13.1496)-- + (-90.1289,-26.2992,-34.4262)-- + (-82.0019,-13.1496,-55.7027)-- + (-82.0019,13.1496,-55.7027)-- + cycle; + +greatRhombicosDodec[18]= + (90.1289,26.2992,34.4262)-- + (98.2558,13.1496,13.1496)-- + (98.2558,-13.1496,13.1496)-- + (90.1289,-26.2992,34.4262)-- + (82.0019,-13.1496,55.7027)-- + (82.0019,13.1496,55.7027)-- + cycle; + +greatRhombicosDodec[19]= + (90.1289,-26.2992,-34.4262)-- + (98.2558,-13.1496,-13.1496)-- + (98.2558,13.1496,-13.1496)-- + (90.1289,26.2992,-34.4262)-- + (82.0019,13.1496,-55.7027)-- + (82.0019,-13.1496,-55.7027)-- + cycle; + +greatRhombicosDodec[20]= + (26.2992,-34.4262,-90.1289)-- + (13.1496,-13.1496,-98.2558)-- + (-13.1496,-13.1496,-98.2558)-- + (-26.2992,-34.4262,-90.1289)-- + (-13.1496,-55.7027,-82.0019)-- + (13.1496,-55.7027,-82.0019)-- + cycle; + +greatRhombicosDodec[21]= + (-26.2992,34.4262,-90.1289)-- + (-13.1496,13.1496,-98.2558)-- + (13.1496,13.1496,-98.2558)-- + (26.2992,34.4262,-90.1289)-- + (13.1496,55.7027,-82.0019)-- + (-13.1496,55.7027,-82.0019)-- + cycle; + +greatRhombicosDodec[22]= + (26.2992,34.4262,90.1289)-- + (13.1496,13.1496,98.2558)-- + (-13.1496,13.1496,98.2558)-- + (-26.2992,34.4262,90.1289)-- + (-13.1496,55.7027,82.0019)-- + (13.1496,55.7027,82.0019)-- + cycle; + +greatRhombicosDodec[23]= + (-26.2992,-34.4262,90.1289)-- + (-13.1496,-13.1496,98.2558)-- + (13.1496,-13.1496,98.2558)-- + (26.2992,-34.4262,90.1289)-- + (13.1496,-55.7027,82.0019)-- + (-13.1496,-55.7027,82.0019)-- + cycle; + +greatRhombicosDodec[24]= + (34.4262,-63.8296,-68.8523)-- + (42.5531,-76.9792,-47.5758)-- + (63.8296,-68.8523,-34.4262)-- + (76.9792,-47.5758,-42.5531)-- + (68.8523,-34.4262,-63.8296)-- + (47.5758,-42.5531,-76.9792)-- + cycle; + +greatRhombicosDodec[25]= + (76.9792,-47.5758,42.5531)-- + (63.8296,-68.8523,34.4262)-- + (42.5531,-76.9792,47.5758)-- + (34.4262,-63.8296,68.8523)-- + (47.5758,-42.5531,76.9792)-- + (68.8523,-34.4262,63.8296)-- + cycle; + +greatRhombicosDodec[26]= + (-34.4262,-63.8296,68.8523)-- + (-42.5531,-76.9792,47.5758)-- + (-63.8296,-68.8523,34.4262)-- + (-76.9792,-47.5758,42.5531)-- + (-68.8523,-34.4262,63.8296)-- + (-47.5758,-42.5531,76.9792)-- + cycle; + +greatRhombicosDodec[27]= + (-76.9792,-47.5758,-42.5531)-- + (-63.8296,-68.8523,-34.4262)-- + (-42.5531,-76.9792,-47.5758)-- + (-34.4262,-63.8296,-68.8523)-- + (-47.5758,-42.5531,-76.9792)-- + (-68.8523,-34.4262,-63.8296)-- + cycle; + +greatRhombicosDodec[28]= + (34.4262,63.8296,68.8523)-- + (42.5531,76.9792,47.5758)-- + (63.8296,68.8523,34.4262)-- + (76.9792,47.5758,42.5531)-- + (68.8523,34.4262,63.8296)-- + (47.5758,42.5531,76.9792)-- + cycle; + +greatRhombicosDodec[29]= + (76.9792,47.5758,-42.5531)-- + (63.8296,68.8523,-34.4262)-- + (42.5531,76.9792,-47.5758)-- + (34.4262,63.8296,-68.8523)-- + (47.5758,42.5531,-76.9792)-- + (68.8523,34.4262,-63.8296)-- + cycle; + +greatRhombicosDodec[30]= + (-34.4262,63.8296,-68.8523)-- + (-42.5531,76.9792,-47.5758)-- + (-63.8296,68.8523,-34.4262)-- + (-76.9792,47.5758,-42.5531)-- + (-68.8523,34.4262,-63.8296)-- + (-47.5758,42.5531,-76.9792)-- + cycle; + +greatRhombicosDodec[31]= + (-76.9792,47.5758,42.5531)-- + (-63.8296,68.8523,34.4262)-- + (-42.5531,76.9792,47.5758)-- + (-34.4262,63.8296,68.8523)-- + (-47.5758,42.5531,76.9792)-- + (-68.8523,34.4262,63.8296)-- + cycle; + +greatRhombicosDodec[32]= + (42.5531,-76.9792,-47.5758)-- + (34.4262,-90.1289,-26.2992)-- + (55.7027,-82.0019,-13.1496)-- + (63.8296,-68.8523,-34.4262)-- + cycle; + +greatRhombicosDodec[33]= + (63.8296,-68.8523,34.4262)-- + (55.7027,-82.0019,13.1496)-- + (34.4262,-90.1289,26.2992)-- + (42.5531,-76.9792,47.5758)-- + cycle; + +greatRhombicosDodec[34]= + (-42.5531,-76.9792,47.5758)-- + (-34.4262,-90.1289,26.2992)-- + (-55.7027,-82.0019,13.1496)-- + (-63.8296,-68.8523,34.4262)-- + cycle; + +greatRhombicosDodec[35]= + (-63.8296,-68.8523,-34.4262)-- + (-55.7027,-82.0019,-13.1496)-- + (-34.4262,-90.1289,-26.2992)-- + (-42.5531,-76.9792,-47.5758)-- + cycle; + +greatRhombicosDodec[36]= + (42.5531,76.9792,47.5758)-- + (34.4262,90.1289,26.2992)-- + (55.7027,82.0019,13.1496)-- + (63.8296,68.8523,34.4262)-- + cycle; + +greatRhombicosDodec[37]= + (63.8296,68.8523,-34.4262)-- + (55.7027,82.0019,-13.1496)-- + (34.4262,90.1289,-26.2992)-- + (42.5531,76.9792,-47.5758)-- + cycle; + +greatRhombicosDodec[38]= + (-42.5531,76.9792,-47.5758)-- + (-34.4262,90.1289,-26.2992)-- + (-55.7027,82.0019,-13.1496)-- + (-63.8296,68.8523,-34.4262)-- + cycle; + +greatRhombicosDodec[39]= + (-63.8296,68.8523,34.4262)-- + (-55.7027,82.0019,13.1496)-- + (-34.4262,90.1289,26.2992)-- + (-42.5531,76.9792,47.5758)-- + cycle; + +greatRhombicosDodec[40]= + (-76.9792,-47.5758,42.5531)-- + (-90.1289,-26.2992,34.4262)-- + (-82.0019,-13.1496,55.7027)-- + (-68.8523,-34.4262,63.8296)-- + cycle; + +greatRhombicosDodec[41]= + (-68.8523,34.4262,63.8296)-- + (-82.0019,13.1496,55.7027)-- + (-90.1289,26.2992,34.4262)-- + (-76.9792,47.5758,42.5531)-- + cycle; + +greatRhombicosDodec[42]= + (-76.9792,47.5758,-42.5531)-- + (-90.1289,26.2992,-34.4262)-- + (-82.0019,13.1496,-55.7027)-- + (-68.8523,34.4262,-63.8296)-- + cycle; + +greatRhombicosDodec[43]= + (-68.8523,-34.4262,-63.8296)-- + (-82.0019,-13.1496,-55.7027)-- + (-90.1289,-26.2992,-34.4262)-- + (-76.9792,-47.5758,-42.5531)-- + cycle; + +greatRhombicosDodec[44]= + (76.9792,47.5758,42.5531)-- + (90.1289,26.2992,34.4262)-- + (82.0019,13.1496,55.7027)-- + (68.8523,34.4262,63.8296)-- + cycle; + +greatRhombicosDodec[45]= + (68.8523,-34.4262,63.8296)-- + (82.0019,-13.1496,55.7027)-- + (90.1289,-26.2992,34.4262)-- + (76.9792,-47.5758,42.5531)-- + cycle; + +greatRhombicosDodec[46]= + (76.9792,-47.5758,-42.5531)-- + (90.1289,-26.2992,-34.4262)-- + (82.0019,-13.1496,-55.7027)-- + (68.8523,-34.4262,-63.8296)-- + cycle; + +greatRhombicosDodec[47]= + (68.8523,34.4262,-63.8296)-- + (82.0019,13.1496,-55.7027)-- + (90.1289,26.2992,-34.4262)-- + (76.9792,47.5758,-42.5531)-- + cycle; + +greatRhombicosDodec[48]= + (47.5758,-42.5531,-76.9792)-- + (26.2992,-34.4262,-90.1289)-- + (13.1496,-55.7027,-82.0019)-- + (34.4262,-63.8296,-68.8523)-- + cycle; + +greatRhombicosDodec[49]= + (-34.4262,-63.8296,-68.8523)-- + (-13.1496,-55.7027,-82.0019)-- + (-26.2992,-34.4262,-90.1289)-- + (-47.5758,-42.5531,-76.9792)-- + cycle; + +greatRhombicosDodec[50]= + (-47.5758,42.5531,-76.9792)-- + (-26.2992,34.4262,-90.1289)-- + (-13.1496,55.7027,-82.0019)-- + (-34.4262,63.8296,-68.8523)-- + cycle; + +greatRhombicosDodec[51]= + (34.4262,63.8296,-68.8523)-- + (13.1496,55.7027,-82.0019)-- + (26.2992,34.4262,-90.1289)-- + (47.5758,42.5531,-76.9792)-- + cycle; + +greatRhombicosDodec[52]= + (47.5758,42.5531,76.9792)-- + (26.2992,34.4262,90.1289)-- + (13.1496,55.7027,82.0019)-- + (34.4262,63.8296,68.8523)-- + cycle; + +greatRhombicosDodec[53]= + (-34.4262,63.8296,68.8523)-- + (-13.1496,55.7027,82.0019)-- + (-26.2992,34.4262,90.1289)-- + (-47.5758,42.5531,76.9792)-- + cycle; + +greatRhombicosDodec[54]= + (-47.5758,-42.5531,76.9792)-- + (-26.2992,-34.4262,90.1289)-- + (-13.1496,-55.7027,82.0019)-- + (-34.4262,-63.8296,68.8523)-- + cycle; + +greatRhombicosDodec[55]= + (34.4262,-63.8296,68.8523)-- + (13.1496,-55.7027,82.0019)-- + (26.2992,-34.4262,90.1289)-- + (47.5758,-42.5531,76.9792)-- + cycle; + +greatRhombicosDodec[56]= + (13.1496,-98.2558,-13.1496)-- + (13.1496,-98.2558,13.1496)-- + (-13.1496,-98.2558,13.1496)-- + (-13.1496,-98.2558,-13.1496)-- + cycle; + +greatRhombicosDodec[57]= + (13.1496,98.2558,13.1496)-- + (13.1496,98.2558,-13.1496)-- + (-13.1496,98.2558,-13.1496)-- + (-13.1496,98.2558,13.1496)-- + cycle; + +greatRhombicosDodec[58]= + (-98.2558,-13.1496,13.1496)-- + (-98.2558,13.1496,13.1496)-- + (-98.2558,13.1496,-13.1496)-- + (-98.2558,-13.1496,-13.1496)-- + cycle; + +greatRhombicosDodec[59]= + (98.2558,13.1496,13.1496)-- + (98.2558,-13.1496,13.1496)-- + (98.2558,-13.1496,-13.1496)-- + (98.2558,13.1496,-13.1496)-- + cycle; + +greatRhombicosDodec[60]= + (13.1496,-13.1496,-98.2558)-- + (-13.1496,-13.1496,-98.2558)-- + (-13.1496,13.1496,-98.2558)-- + (13.1496,13.1496,-98.2558)-- + cycle; + +greatRhombicosDodec[61]= + (13.1496,13.1496,98.2558)-- + (-13.1496,13.1496,98.2558)-- + (-13.1496,-13.1496,98.2558)-- + (13.1496,-13.1496,98.2558)-- + cycle; +greatRhombicosDodec=scale3(1/abs(point(greatRhombicosDodec[0],0)))*greatRhombicosDodec; + +//*** end of greatRhombicosDodec *** diff --git a/js_tube.asy b/js_tube.asy new file mode 100644 index 0000000..d8b4d59 --- /dev/null +++ b/js_tube.asy @@ -0,0 +1,182 @@ +// Copyright (c) 2007, author: Jens Schwaiger +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or (at +// your option) any later version. + +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +// 02110-1301, USA. + +// INSTALLATION: +// Paste this file in the sub-directory $HOME/.asy + +// Code: + +import graph3; + +// similar to roundedpath for 3D +guide3 roundedguide(guide3 A, real r=0.2){ + guide3 rounded; + triple before, after, indir, outdir; + int len=length(A); + bool guideclosed=cyclic(A); + if(len<2){return A;}; + if(guideclosed){rounded=point(point(A,0)--point(A,1),r);} + else {rounded=point(A,0);}; + for(int i=1;i0) + {return unit((-p.y,p.x,0));} else {return (1,0,0);}; +}; +// used in constructin the array of Bishop frames +triple nextnormal(triple p, triple q){ + triple nw=p-(dot(p,q)*q); + if(abs(nw)<0.001){return p;} else {return unit(nw);} +}; + +// Bishop frame itself; for closed curves a modification guarantees +// smoothness also at the +// "closing" position of the guide3 g +// tw<>0 means some additional twist (measured in radians) +// for closed g twist should be a multiple of 2pi +/* + See http://ada.math.uga.edu/research/software/tube/tube.html +*/ +triple[][] bframe(guide3 g, int subdiv=20, real tw=0){ + triple[][] bf=new triple[subdiv+1][3]; + real lg=arclength(g); + for(int i=0;i=0) + { + direction=-space*I*dir(g,length(g)/2); + sg=1; + } + else direction=space*I*dir(g,length(g)/2); + picture tpic; + tpic.add(new void (frame f, transform t) { + drawarrow(f,head,t*shift(inverse(t)*(-direction))*g,p, + size,sg*angle,filltype,position,true,margin,false); + drawarrow(f,head,t*shift(inverse(t)*direction)*reverse(g),p, + size,sg*angle,filltype,position,true,margin,false); + }); + tpic.addPath(g,p); + real sz=size; + real gle=angle; + filltype fl=filltype; + addArrow(tpic,head,g,p,sz,gle,fl,position(position,size,g,false)); + add(pic,tpic); + return false; + }; +}; + +arrowbar EdgeArrows=EdgeArrows(); diff --git a/pi_base.asy b/pi_base.asy new file mode 100644 index 0000000..40dd68e --- /dev/null +++ b/pi_base.asy @@ -0,0 +1,482 @@ +// Copyright (c) 2007, Philippe Ivaldi. +// Version: $Id: base_pi.asy,v 0.0 "2007/01/27 10:35:52" Philippe Ivaldi Exp $ +// Last modified: Sun Oct 14 22:36:12 CEST 2007 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or (at +// your option) any later version. + +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +// 02110-1301, USA. + +// Commentary: + +// THANKS: + +// BUGS: + +// INSTALLATION: + +// Code: + +import math; + +pair userMin(picture pic=currentpicture){return (pic.userMin().x,pic.userMin().y);} +pair userMax(picture pic=currentpicture){return (pic.userMax().x,pic.userMax().y);} + +// A rotation in the direction dir limited to [-90,90] +// This is useful for rotating text along a line in the direction dir. +private transform rotate(explicit pair dir) +{ + real angle=degrees(dir); + if(angle > 90 && angle < 270) angle -= 180; + return rotate(angle); +} + +// *=======================================================* +// *.......................Structures......................* +// *=======================================================* +/**/ +guide Straight(... guide[])=operator --;/**/ +/**/ +guide Spline(... guide[])=operator ..;/**/ + +typedef guide interpolate(... guide[]); + +/**/ +struct rational +{/* + 'p' est le numérateur, 'q' est le dénominateur. + 'ep' est la précision avec laquelle le rationnel a été obtenu dans + le cas où il y convertion à partir d'un irrationnel. + .................................................. + 'p' is the numerator, 'q' is the denominator. + 'ep' is the precision with which the rational was obtained in the case of a + convertion from irrational. + */ + int p; + int q; + real ep; +}/**/ + +rational operator init() {return new rational;} + +/*ANCrational(real,real)ANC*/ +/**/ +rational rational(real x, real ep=1/10^5) +{/*Retourne le rationnel qui approxime 'x' tel que 'abs(p/q-x)<=ep'. + .................................................. + Return the rational which approximates 'x' such as + 'abs(p/q-x)<=ep'. + */ + rational orat; + int q=1; + while (abs(round(q*x)-q*x)>ep) + { + ++q; + } + orat.p=round(q*x); + orat.q=q; + orat.ep=ep; + return orat; +} + +// *=======================================================* +// *...................Calculus routines...................* +// *=======================================================* +/**/ +int pgcd(int a, int b) +{/*Greatest common divisor.*/ + int a_=abs(a), b_=abs(b), r=a_; + if (b_>a_) {a_=b_; b_=r; r=a_;} + while (r>0) + { + r=a_%b_; + a_=b_; + b_=r; + } + return a_; +} + +/**/ +int gcd(int a, int b) +{/*Greatest common divisor.*/ + return pgcd(a,b); +} + +// *=======================================================* +// *.................Extend point routine..................* +// *=======================================================* +/**/ +pair[] points(path g, real[] t) +{/*Extend 'point(path, real)' routine to array of 'real'.*/ + pair [] op; + for (int i=0; i < t.length; ++i) { + op.push(point(g,t[i])); + } + return op; +} + +/**/ +pair [] points(path g, int[] t) +{/*Extend 'point(path, int)' routine to array of 'int'.*/ + pair [] op; + for (int i=0; i < t.length; ++i) { + op.push(point(g,t[i])); + } + return op; +} + +// *=======================================================* +// *.........................join..........................* +// *=======================================================* +/**/ +guide join(pair[] a, interpolate join=operator --) +{/**/ + guide og; + for(int i=0; i < a.length; ++i) og=join(og,a[i]); + return og; +} + +// *=======================================================* +// *...................Extend intersect....................* +// *=======================================================* +/**/ +real intersectp(path g, pair a, int n=1, real fuzz=0) +{/*Retourne le "temps" par rapport à 'g' du premier point + d'intersection de 'g' avec le plus petit cercle de centre 'a' + coupant 'g'. + La précision du découpage peut être augmentée en augmentant 'n'. + .................................................. + Return the time along 'g' of the first intersection point of the path + "g" with the smaller circle centered in 'a' and which is intersecting + 'g'. + The cutting precision is increased by increasing n.*/ + real r=0; + real [] ip=intersect(g,(path)a,fuzz); + while (ip.length < 2) + { + r+=1/(50*n); + ip=intersect(g,shift(a)*scale(r)*unitcircle,fuzz); + } + return ip[0]; +} + +/**/ +real[] intersectsv(path p, real x) +{/*Retourne les "temps" par rapport à 'g' de tous les points + d'intersection de 'g' avec la droite verticale passant par (x,0). + .................................................. + Return the times along "g" of all intersection points of the path + "g" with the vertical line passing by (x,0).*/ + return intersections(p,(x,0),(x,1)); +} + +/**/ +real[] intersectsh(path p, real y) +{/*Retourne les "temps" par rapport à 'g' de tous les points + d'intersection de 'g' avec la droite horizontale passant par (0,y). + La précision du découpage peut être augmentée en augmentant 'n'. + .................................................. + Return the times along 'g' of all intersection points of the path + 'g' with the horizontal line passing by (0,y).*/ + return intersections(p,(0,y),(1,y)); +} + +/**/ +real[] intersectsd(path g, pair a, pair b) +{/*Retourne les "temps" par rapport à 'g' de tous les points + d'intersection de la demi-droite [ab) avec 'g'. + .................................................. + Return the times along 'g' of all intersection points of the + half-line from 'a' towards 'b' with the path 'g'.*/ + real[] ot, ott; + ott=intersections(g,a,b); + pair ab=b-a; + for(real t:ott) if(dot(point(g,t)-a,ab) >= 0) ot.push(t); + return ot; +} + + +/**/ +pair[] intersectionpointsv(path g, real x) +{/*Retourne tous les points d'intersection de 'g' avec la droite + verticale passant par (x,0). + .................................................. + Return all the intersection points of the path + "g" with the vertical line passing by (x,0).*/ + return points(g,intersectsv(g,x)); +} + +/**/ +pair[] intersectionpointsh(path g, real y) +{/* + Retourne tous les points d'intersection de 'g' avec la droite + horizontale passant par (0,y). + .................................................. + Return all the intersection points of the path + "g" with the horizontal line passing by (0,y).*/ + return points(g,intersectsh(g,y));/*IDOCpoints(path,real[])IDOC*/ +} + +/**/ +pair[] intersectionpointsd(path g, pair a, pair b) +{/* + Retourne tous les points d'intersection de la demi-droite [ab) avec + 'g'. + .................................................. + Return all the intersection points of the + half-line from 'a' towards 'b' with the path 'g'.*/ + return points(g,intersectsd(g,a,b)); +} + +/**/ +pair[] intersectionpoints(path g, pair a, pair b) +{/* + Retourne tous les points d'intersection de la droite (ab) avec + 'g'. + .................................................. + Return all the intersection points of the line (ab) with the path + 'g'.*/ + return points(g,intersections(g,a,b)); +} + +// *=======================================================* +// *.......................Fractions.......................* +// *=======================================================* + +/**/ +string texfrac(int p, int q, + string factor="", + bool signin=false, bool factorin=true, + bool displaystyle=false, + bool zero=true) +{/* Retourne le code LaTeX pour écrire la fraction p/q*factor. + Si 'signin' vaut 'true' le signe '-' est dans la fraction (au + numérateur). + Si 'displaystyle' vaut 'true' le code est en mode 'displaystyle'. + Si 'zero' vaut 'false' et 'p' vaut 0, le code génère 0/p*factor; 0 + si 'zero' vaut 'true'. + .................................................. + Return the LaTeX code to write the fraction p/q*factor. + If 'signin' is 'true' the sign '-' is inside the fraction (within + the numerator). + If 'displaystyle' is 'true' the code is in mode 'displaystyle'. + If 'zero' is 'false' and 'p' is 0, the code generates 0/p*factor; 0 + if 'zero' is 'true'.*/ + if (p==0) return (zero ? "$0$" : ""); + string disp= displaystyle ? "$\displaystyle " : "$"; + int pgcd=pgcd(p,q); + int num= round(p/pgcd), den= round(q/pgcd); + string nums; + if (num==1) + if (factor=="" || (!factorin && (den !=1))) nums="1"; else nums=""; + else + if (num==-1) + if (factor=="" || (!factorin && (den !=1))) nums="-1"; else nums="-"; + else nums= (string) num; + if (den==1) return "$" + nums + factor + "$"; + else + { + string dens= (den==1) ? "" : (string) den; + if (signin || num>0) + if (factorin) + return disp + "\frac{" + nums + factor + "}{" + (string) dens + "}$"; + else + return disp + "\frac{" + nums + "}{" + (string) dens + "}"+ factor + "$"; + else + { + if (num==-1) + if (factor=="" || !factorin) nums="1"; else nums=""; + else nums=(string)(abs(num)); + if (factorin) + return disp + "-\frac{" + nums + factor + "}{" + (string) dens + "}$"; + else + return disp + "-\frac{" + nums + "}{" + (string) dens + "}"+ factor + "$"; + } + } +} + +/**/ +string texfrac(rational x, + string factor="", + bool signin=false, bool factorin=true, + bool displaystyle=false, + bool zero=true) +{/**/ + return texfrac(x.p, x.q, factor, signin, factorin, displaystyle, zero); +} + +// *=======================================================* +// *......................About paths......................* +// *=======================================================* + +/**/ +void drawline(picture pic=currentpicture, Label L="",pair P, bool dirP, pair Q, bool dirQ, + align align=NoAlign, pen p=currentpen, + arrowbar arrow=None, arrowbar bar=None, margin margin=NoMargin, + Label legend="", marker marker=nomarker) +{/*Ajoute les deux paramètres 'dirP' et 'dirQ' à la routine native + 'drawline' du module 'math'. + La segment [PQ] sera prolongé en direction de P si 'dirP=true', + en direction de Q si 'dirQ=true'. + Si 'dirP=dirQ=true', le comportement est celui du 'drawline' natif. + Ajoute tous les autres paramètres de 'draw'. + .................................................. + Add the two parameters 'dirP' and 'dirQ' to the native routine + 'drawline' of the module 'maths'. + Segment [PQ] will be prolonged in direction of P if 'dirP=true', in + direction of Q if 'dirQ=true'. + If 'dirP=dirQ=true', the behavior is that of the native 'drawline'. + Add all the other parameters of 'Draw'.*/ + pic.add(new void (frame f, transform t, transform, pair m, pair M) { + picture opic; + // Reduce the bounds by the size of the pen. + m -= min(p); M -= max(p); + + // Calculate the points and direction vector in the transformed space. + pair z=t*P; + pair q=t*Q; + pair v=t*Q-z; + path g; + real cp = dirP ? 1:0; + real cq = dirQ ? 1:0; + // Handle horizontal and vertical lines. + if(v.x == 0) { + if(m.x <= z.x && z.x <= M.x) + g= dot(v,(z.x,m.y))<0 ? + (z.x,z.y+cp*(m.y-z.y))--(z.x,q.y+cq*(M.y-q.y)): + (z.x,q.y+cq*(m.y-q.y))--(z.x,z.y+cp*(M.y-z.y)); + } else if(v.y == 0) { + if(m.y <= z.y && z.y <= M.y) + g=(m.x,z.y)--(M.x,z.y); + g= dot(v,(m.x,z.y))<0 ? + (z.x+cp*(m.x-z.x),z.y)--(q.x+cq*(M.x-q.x),z.y): + (q.x+cq*(m.x-q.x),z.y)--(z.x+cp*(M.x-z.x),z.y); + } else { + // Calculate the maximum and minimum t values allowed for the + // parametric equation z + t*v + real mx=(m.x-z.x)/v.x, Mx=(M.x-z.x)/v.x; + real my=(m.y-z.y)/v.y, My=(M.y-z.y)/v.y; + real tmin=max(v.x > 0 ? mx : Mx, v.y > 0 ? my : My); + real tmax=min(v.x > 0 ? Mx : mx, v.y > 0 ? My : my); + pair pmin=z+tmin*v; + pair pmax=z+tmax*v; + if(tmin <= tmax) + g= z+cp*tmin*v--z+(cq==0 ? v:tmax*v); + } + if (length(g)>0) draw(opic, L=L, g=g, align=align, p=p, + arrow=arrow, bar=bar, margin=margin, + legend=legend, marker=marker); + add(f,opic.fit()); + }); +} + +/**/ +void drawline(picture pic=currentpicture, Label L="",path g, bool begin=true, bool end=true, + align align=NoAlign, pen p=currentpen, + arrowbar arrow=None, arrowbar bar=None, margin margin=NoMargin, + Label legend="", marker marker=nomarker) +{/**/ + drawline(pic, L, point(g,0), begin, point(g,length(g)), end, + align, p, arrow, bar, margin, legend, marker); +} + +// *=======================================================* +// *....................Rotated labels.....................* +struct rotatedLabel +{ + Label L; +}; + +rotatedLabel rotatedLabel(string s, string size="", + align align=NoAlign, + pen p=nullpen, filltype filltype=NoFill) +{ + rotatedLabel OL; + OL.L.init(s,size,align,p,Rotate,filltype); + return OL; +} + +rotatedLabel rotatedLabel(Label L, explicit position position, + align align=NoAlign, + pen p=nullpen, filltype filltype=NoFill) +{ + rotatedLabel OL; + OL.L=Label(L,align,p,Rotate,filltype); + OL.L.position(position); + return OL; +} + +rotatedLabel rotatedLabel(Label L, pair position, + align align=NoAlign, + pen p=nullpen, filltype filltype=NoFill) +{ + return rotatedLabel(L,(position) position,align,p,filltype); +} + +void draw(picture pic=currentpicture, rotatedLabel L, path g, align align=NoAlign, + pen p=currentpen, arrowbar arrow=None, arrowbar bar=None, + margin margin=NoMargin, Label legend="", marker marker=nomarker) +{ + Label LL=L.L.copy(); + bool relative=LL.position.relative; + real position=LL.position.position.x; + if(LL.defaultposition) {relative=true; position=0.5;} + if(relative) position=reltime(g,position); + LL.embed=Rotate(rotate(dir(g,position))*(1,0)); + LL.align.dir=LL.embed(identity())*LL.align.dir; + align lalign=align.copy(); + lalign.dir=dir(g,position)*align.dir; + draw(pic, LL, g, lalign, p, arrow, bar, margin, legend, marker); +} +// *...................End rotatedLabel....................* +// *=======================================================* + + +/**/ +void finalbounds(picture pic=currentpicture,pen p=currentpen) +{/*Write the final bounding box of picture 'pic'. + This routine is useful to determine the right top and left bottom + point for enlarging manually the bounding box.*/ + pic.add(new void (frame f, transform t, transform, pair m, pair M) { + // Reduce the bounds by the size of the pen and the margins. + m += min(p); M -= max(p); + transform T=inverse(t); + write("box("+(string)(T*m)+", "+(string)(T*M)+")"); + },true); +} + +/**/ +bool isPrime(int num) +{/**/ + if (num == 2) + return true; + else if (num % 2 == 0) + return false; + else + { + bool prime = true; + int divisor = 3; + int upperLimit = ceil(sqrt(num) + 1); + while (divisor <= upperLimit) + { + if (num % divisor == 0) + prime = false; + divisor += 2; + } + return prime; + } +} + + + + diff --git a/pi_edvenn.asy b/pi_edvenn.asy new file mode 100644 index 0000000..bd780b3 --- /dev/null +++ b/pi_edvenn.asy @@ -0,0 +1,60 @@ +// Copyright (c) 2007, Philippe Ivaldi. +// Version: $Id: edvenn_pi.asy,v 0.0 2007/02/19 17:49:31 Philippe Ivaldi Exp $ + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or (at +// your option) any later version. + +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +// 02110-1301, USA. + +// Commentary: + +// THANKS: + +// BUGS: + +// INSTALLATION: + +// Code: + + +// Venn diagram // Diagramme de Venn +// Edwards' construction // Construction d'Edwards +import roundedpath; +size(10cm,0); +path [] EdVenn(int n) +{ + path [] opath; + if (n>=1) + opath.push(shift(-1.4,-.9)*roundedpath(xscale(2.8)*yscale(.9)*unitsquare,.1)); + if (n>=2) + opath.push(shift(0,-.9)*roundedpath(xscale(1.4)*yscale(1.8)*unitsquare,.1)); + if (n>=3) + opath.push(scale(.5)*unitcircle); + for (int i=1; i<=n-3; ++i) + { + pair pcle=point(opath[2],1/(2^i)), + ccle=intersectionpoint(pcle--(pcle-dir(opath[2],1/(2^i))), (0,0)--(1,0)); + path cle=shift(ccle)*scale(abs(pcle-ccle))*unitcircle; + real[] p1=intersect(cle, opath[2]); + path ocle=subpath(cle,-p1[0],p1[0]); + guide tpath; + real step=360/(2^i), a=0; + for (int j=0; j<2^i; ++j) + { + tpath=tpath..rotate(a)*ocle; + a+=step; + } + opath.push(tpath..cycle); + } + return opath; +} diff --git a/pi_graph.asy b/pi_graph.asy new file mode 100644 index 0000000..675ab2a --- /dev/null +++ b/pi_graph.asy @@ -0,0 +1,748 @@ +// Copyright (c) 2007, Philippe Ivaldi. +// Version: $Id: graph_pi.asy,v 0.0 "2007/01/27 10:35:52" Philippe Ivaldi Exp $ +// Last modified: Fri Mar 28 15:57:10 CET 2008 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or (at +// your option) any later version. + +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +// 02110-1301, USA. + +// Commentary: + +// THANKS: + +// BUGS: + +// INSTALLATION: +// copier ce fichier dans le sous-répertoire $HOME/.asy +// Move this file in the sub-directory $HOME/.asy + +//CODE: + +import graph; +import base_pi; +import markers; +usepackage("mathrsfs"); + +int None=0, onX=1, onY=2, onXY=3; +// Real functions +typedef real realfunction(real); + +struct graphicrules +{// used to comunicate graphicrules to cartesianaxis. + real xmin,xmax; + real ymin,ymax; + bool xcrop,ycrop; + void set(picture pic=currentpicture){ + xlimits(pic,xmin, xmax, xcrop); + ylimits(pic,ymin, ymax, ycrop); + } +}; +graphicrules init() {return new graphicrules;} +graphicrules graphicrules = new graphicrules; +void graph_pi_exitfunction(){}; + +/*ANCgraphicrulesANC*/ +void graphicrules(picture pic=currentpicture, real unit=1cm, + real xunit=unit != 0 ? unit : 0, + real yunit=unit != 0 ? unit : 0, + real xmin=-infinity, real xmax=infinity, real ymin=-infinity, real ymax=infinity, + bool crop=NoCrop, bool xcrop=crop, bool ycrop=crop) +{ + graphicrules.xmin=xmin; + graphicrules.xmax=xmax; + graphicrules.ymin=ymin; + graphicrules.xmax=xmax; + graphicrules.ymax=ymax; + graphicrules.xcrop=xcrop; + graphicrules.ycrop=ycrop; + pic.unitsize(x=xunit,y=yunit); + graphicrules.set(pic); + graph_pi_exitfunction = new void() { + graphicrules.set(pic); + }; + +} + +ticklabel NoZero(string s=defaultformat) { + return new string(real x) { + if (x!=0) return format(s,x); + else return ""; + }; +} + + +ticklabel labelfrac(real ep=1/10^5, real factor=1, + string symbol="", + bool signin=false, bool symbolin=true, + bool displaystyle=false, + bool zero=true) +{ + return new string(real x) { + return texfrac(rational(x/factor), symbol, signin, symbolin, displaystyle, zero); + }; +} + +ticklabel labelfrac=labelfrac(); + +// *=======================================================* +// *....................Graph paper....................* +// *=======================================================* +/*ANCmillimeterpaperANC*/ +picture millimeterpaper(picture pic=currentpicture, pair O=(0,0), + real xmin=infinity, real xmax=infinity, + real ymin=infinity, real ymax=infinity, + pen p=.5bp+orange) +{ + picture opic; + real + cofx = pic.xunitsize/cm, + cofy = pic.yunitsize/cm; + real + xmin = (xmin == infinity) ? pic.userMin().x*cofx : xmin*cofx, + xmax = (xmax == infinity) ? pic.userMax().x*cofx : xmax*cofx, + ymin = (ymin == infinity) ? pic.userMin().y*cofy : ymin*cofy, + ymax = (ymax == infinity) ? pic.userMax().y*cofy : ymax*cofy; + path + ph = (xmin*cm, 0)--(xmax*cm, 0), + pv = (0, ymin*cm)--(0, ymax*cm); + real [] step={5, 1, .5, .1}; + pen [] p_={ p, scale(.7)*p, scale(.4)*p, scale(.2)*p}; + + for (int j=0; j<4; ++j) + { + for (real i=O.y; i <= ymax; i += step[j]) { + draw(opic, shift(0, i*cm) * ph, p_[j]); + } + for (real i=O.y; i >= ymin ; i -= step[j]) { + draw(opic, shift(0, i*cm) * ph, p_[j]); + } + for (real i=O.x; i <= xmax; i += step[j]) { + draw(opic, shift(i*cm, 0) * pv, p_[j]); + } + for (real i=O.x; i >= xmin; i -= step[j]) { + draw(opic, shift(i*cm, 0) * pv, p_[j]); + } + } + + return opic; +} + +// *=======================================================* +// *.....................Axis and grid.....................* +// *=======================================================* +/*ANCgridANC*/ +void grid(picture pic=currentpicture, + real xmin=pic.userMin().x, real xmax=pic.userMax().x, + real ymin=pic.userMin().y, real ymax=pic.userMax().y, + real xStep=1, real xstep=.5, + real yStep=1, real ystep=.5, + pen pTick=nullpen, pen ptick=grey, bool above=false) +{ + draw(pic,box((xmin,ymin),(xmax,ymax)),invisible); + xaxis(pic, BottomTop, xmin, xmax, + Ticks("%",extend=true,Step=xStep,step=xstep,pTick=pTick,ptick=ptick), + above=above, p=nullpen); + yaxis(pic, LeftRight, ymin, ymax, + Ticks("%",extend=true,Step=yStep,step=ystep,pTick=pTick,ptick=ptick), + above=above, p=nullpen); +} + +/*ANCcartesianaxisANC*/ +void cartesianaxis(picture pic=currentpicture, + Label Lx=Label("$x$",align=2S), + Label Ly=Label("$y$",align=2W), + real xmin=-infinity, real xmax=infinity, + real ymin=-infinity, real ymax=infinity, + real extrawidth=1, real extraheight=extrawidth, + pen p=currentpen, + ticks xticks=Ticks("%",pTick=nullpen, ptick=grey), + ticks yticks=Ticks("%",pTick=nullpen, ptick=grey), + bool viewxaxis=true, + bool viewyaxis=true, + bool above=true, + arrowbar arrow=Arrow) +{ + graphicrules.set(pic); + xmin=(xmin == -infinity) ? pic.userMin().x : xmin; + xmax=(xmax == infinity) ? pic.userMax().x : xmax; + ymin=(ymin == -infinity) ? pic.userMin().y : ymin; + ymax=(ymax == infinity) ? pic.userMax().y : ymax; + extraheight= pic.yunitsize != 0 ? cm*extraheight/(2*pic.yunitsize) : 0; + extrawidth = pic.xunitsize != 0 ? cm*extrawidth/(2*pic.xunitsize) : 0; + if (viewxaxis) + { + yequals(pic, Lx, 0, xmin-extrawidth, xmax+extrawidth, p, above, arrow=arrow); + yequals(pic, 0, xmin, xmax, p, xticks, above); + } + if (viewyaxis) + { + xequals(pic, Ly, 0, ymin-extraheight, ymax+extraheight, p, above, arrow=arrow); + xequals(pic, 0, ymin, ymax, p, yticks, above); + } +} + +real labelijmargin=1; + +/*ANClabeloijANC*/ +void labeloij(picture pic=currentpicture, + Label Lo=Label("$O$",NoFill), + Label Li=Label("$\overrightarrow{\imath}$",NoFill), + Label Lj=Label("$\overrightarrow{\jmath}$",NoFill), + pen p=scale(2)*currentpen, + pair diro=SW, pair diri=labelijmargin*S, pair dirj=labelijmargin*1.5*W, + filltype filltype=NoFill, arrowbar arrow=Arrow(2mm), + marker marker=dot) +{ + if (Lo.filltype==NoFill) Lo.filltype=filltype; + if (Li.filltype==NoFill) Li.filltype=filltype; + if (Lj.filltype==NoFill) Lj.filltype=filltype; + labelx(pic, Lo, 0, diro, p); + draw(pic, Li, (0,0)--(1,0), diri, p, arrow); + draw(pic, Lj, (0,0)--(0,1), dirj, p, arrow); + if(marker != nomarker) draw(pic, (0,0), p, marker); +} + +real labelIJmargin=1; + +/*ANClabeloIJANC*/ +void labeloIJ(picture pic=currentpicture, + Label Lo=Label("$O$",NoFill), + Label LI=Label("$I$",NoFill), + Label LJ=Label("$J$",NoFill), + pair diro=SW, pair dirI=labelIJmargin*S, pair dirJ=labelIJmargin*W, + pen p=currentpen, + filltype filltype=NoFill, + marker marker=dot) +{ + if (Lo.filltype==NoFill) Lo.filltype=filltype; + if (LI.filltype==NoFill) LI.filltype=filltype; + if (LJ.filltype==NoFill) LJ.filltype=filltype; + labelx(pic, LI, 1, dirI, p); + labely(pic, LJ, 1, dirJ, p); + labelx(pic, Lo, 0, diro, p); + if(marker != nomarker) draw(pic, (0,0), p, marker); +} + +// *=======================================================* +// *....................Recursivegraph.....................* +// *=======================================================* +typedef void recursiveroutime(picture, real F(real), real, int, int, + Label, align, pen, arrowbar, arrowbar, + margin, Label, marker); + +/*ANCrecursiveoptionANC*/ +recursiveroutime recursiveoption(Label L="u", + bool labelbegin=true, + bool labelend=true, + bool labelinner=true, + bool labelalternate=false, + string format="", + int labelplace=onX, + pen px=nullpen, + pen py=nullpen, + bool startonyaxis=false, + arrowbar circuitarrow=None, + marker automarker=marker(cross(4)), + marker xaxismarker=nomarker, + marker yaxismarker=nomarker, + marker xmarker=nomarker, + marker fmarker=nomarker) +{ + return new void(picture pic, real F(real), real u0, int n0, int n, + Label L_, align align, + pen p, arrowbar arrow, arrowbar bar, + margin margin, Label legend, marker marker_) + { + real [] u; + u[n0]=u0; + for(int i=n0+1;in0) + { + if (px!=invisible) + { + draw(pic,(u[i],u[i])--(u[i],0),px); + if (addlabelautomark) add(pic,automarker.f, (u[i],u[i])); + } + } + if (i>n0) + { + if (py!=invisible) + { + if (addlabelautomark) add(pic,automarker.f, (u[i-1],u[i])); + draw(pic,(u[i-1],u[i])--(0,u[i]),py); + } + } + if (Le) + L.s=format(format == "" ? defaultformat : format,u[i]); + else if (Lno) L.s=""; else + if (fe) L.s="$" + Ls + "_{" + (string) i + "}$"; else + L.s="$" + Ls + "_{" + (string) i + "}" + format(format,u[i]) + "$"; + if (labelplace==1 || labelplace==3) + {//Label on xaxis + L.position((u[i],0)); + L.align(L.align,S); + if (labelalternate && i!=n0) {L.align(-L.align.dir);} + L.s=baseline(L.s,"$p_{1234567890}$"); + if (addlabelautomark) label(pic,L); + if (xaxismarker==nomarker && addlabelautomark) add(pic,automarker.f, (u[i],0)); + } + if (labelplace==2 || labelplace==3) + {//Label on yaxis + L.position((0,u[i])); + L.align(L.align,W); + if (labelalternate && i!=n0) {L.align(-L.align.dir);} + L.s=baseline(L.s,"$w_{1234567890}$"); + if (addlabelautomark) label(pic,L); + if (yaxismarker==nomarker && addlabelautomark) add(pic,automarker.f, (0,u[i])); + } + add(pic,xaxismarker.f, (u[i],0)); + if (i>n0 || startonyaxis) add(pic,yaxismarker.f, (0,u[i])); + if (i>n0 || startonyaxis) add(pic,xmarker.f, (u[i],u[i])); + if (i>n0) add(pic,fmarker.f, (u[i-1],u[i])); + } + }; +} + +recursiveroutime DefaultRecursiveOption=recursiveoption(); + +struct recursivegraph +{ + real f(real); + real u0; + int n0; + int n; + recursiveroutime recursiveroutime=DefaultRecursiveOption; + void draw(picture pic=currentpicture, + Label L, align align, + pen p, arrowbar arrow, arrowbar bar, + margin margin, Label legend, marker marker) + {recursiveroutime(pic, f, u0, n0, n, + L, align, + p, arrow, bar, + margin, legend, marker);}; +}; +recursivegraph operator init() {return new recursivegraph;} + +recursivegraph recursivegraph(real F(real), real u0, int n0=0, int n) +{ + recursivegraph orec= new recursivegraph; + orec.f=F; + orec.u0=u0; + orec.n0=n0; + orec.n=n; + return orec; +} + + +void draw(picture pic=currentpicture, Label L="", recursivegraph g, recursiveroutime lr=DefaultRecursiveOption,align align=NoAlign, + pen p=currentpen, arrowbar arrow=None, arrowbar bar=None, + margin margin=NoMargin, Label legend="", marker marker=nomarker) +{ + g.recursiveroutime=lr; + g.draw(pic, L, align, p, arrow, bar, margin, legend, marker); +} + +guide graph(picture pic=currentpicture, real f(real), + int n=ngraph, interpolate join=operator --) +{ + return graph(pic, f, a=pic.userMin().x, b=pic.userMax().x, n, join); +} + + +/*ANCgraphpoint(...)ANC*/ +void graphpoint(picture pic=currentpicture, + Label L="", + real f(real), real xCoordinate, + real xmin=0, real ymin=0, + int draw=onXY, + pen px=nullpen, pen py=px, + arrowbar arrow=None, arrowbar bar=None, + margin marginy=NoMargin, margin marginx=NoMargin, + bool extend=false, bool extendx=extend, bool extendy=extend, + Label legendx="", Label legendy="", + marker markerx=nomarker, marker markery=nomarker) +{/*DOC Mark a point on a curve defined by real f(real). DOC*/ + /*EXAgraphpoint(...)EXA*/ + real xmax,ymax; + if (extendy) { + xmin=pic.userMin().x; + xmax=pic.userMax().x; + } else xmax=xCoordinate; + if (extendx) { + ymin=pic.userMin().y; + ymax=pic.userMax().y; + } else ymax=f(xCoordinate); + px = (px==nullpen) ? currentpen+linetype("6 6") : px; + py = (py==nullpen) ? currentpen+linetype("6 6") : py; + L.align(L.align,NE); + label(pic, L, (xCoordinate,f(xCoordinate))); + if (draw==onX || draw==onXY) + draw(pic, (xCoordinate,ymin)--(xCoordinate,ymax), + p=px, arrow=arrow, bar=bar, margin=marginx, legend=legendx, marker=markerx); + if (draw==onY || draw==onXY) + draw(pic, (xmin,ymax)--(xmax,ymax), + p=py, arrow=arrow, bar=bar, margin=marginy, legend=legendy, marker=markery); +} + +// *=======================================================* +// *.....................About tangent.....................* +// *=======================================================* +/*ANCtangentANC*/ +path tangent(path g, real x, path b=box(userMin(currentpicture),userMax(currentpicture))) +{//Return the tangent with the maximun size allowed by b (cyclic path) + if (!cyclic(b)) abort("tangent: path b is not a cyclic path..."); + pair pt=point(g,intersectsv(g,x)[0]); + real t=intersectp(g,pt); + real rt=intersectp(reverse(g),pt); + pair dirr=dir(g,t); + pair dll=intersectionpointsd(b,pt,shift(pt)*dirr)[0]; + pair dlr=intersectionpointsd(b,pt,shift(pt)*(-dirr))[0]; + return dll--dlr; +} + +/*ANCaddtangentANC*/ +void addtangent(picture pic=currentpicture, + path g, + pair pt,//Point on the path g + real size=infinity,//ABSOLUTE size of the tangent line (infinity=maximun size according the size of the pic) + bool drawright=true,//Draw the tangent at the right + bool drawleft=true,//... left + pair v=(infinity,infinity),//A finite value forces the value of the derivative + pair vr=v,//A finite value forces the value of the derivative at right + pair vl=v,//A finite value forces the value of the derivative at left + arrowbar arrow=null,//null=automatic determination + margin margin=NoMargin,//Useful with size=infinity + Label legend="", + pen p=currentpen, + real dt=2,//Increase this number can help to discern tangent at the right and tgt at the left. + bool differentiable=true)//Set it "true" maybe useful if you are sure that "g is differentiable" at this point. +{ + arrowbar arrow_=arrow; + pair dir_r,dir_l; + if (intersect(g,pt).length<2) abort("addtangent: the point is not on the path."); + real t=intersectp(g,pt); + if (!differentiable) { + path subpa,subpb; + subpa=subpath(g,0,t-dt/2); + subpb=subpath(g,t+dt/2,length(g)); + dir_l=(vl.x*/ +path polygon(pair[] c) +{/*Join the nodes c with segments.*/ + guide g; + for (int k=0; k < c.length; ++k) + g=g--c[k]; + return g--cycle; +} + +/**/ +pair pivot(pair[] c) { + /*Return the point with the lowest y-coordinate. + If there is a tie, the point with the lowest x-coordinate out of the tie breaking candidates is returned.*/ + real[][] coords; + for (int i=0; i < c.length; ++i) coords.push(new real[] {c[i].y,c[i].x,i}); + return c[round(sort(coords)[0][2])]; +} + +/**/ +pair[] polarSort(pair[] c, int pivot=-1) +{/*Sort points by the polar angles in ascending order. + If pivot < 0, use the pair returned by pivot(c) as origin else c[pivot].*/ + int n=c.length; + if(pivot >= n) abort("polarSort: pivot to large."); + pair O; + real[][] polar; + if(pivot < 0) { + O=pivot(c); + for (int i=0; i < n; ++i) + polar.push(new real[] {degrees(c[i]-O,false),abs(c[i]-O),i}); + polar=sort(polar); + } else { + O=c[pivot]; // Origine of the polar coordinates system + real[][] polp, polm; + for (int i=0; i < n; ++i) { + real d; + if(i != pivot) { + d=degrees(c[i]-O,false); + if(d > 180) d=d-360; + if(d > 0) // 0 <= angle <= 180 + polp.push(new real[] {d,abs(c[i]-O),i}); + else // 180 < angle < 0 + polm.push(new real[] {d,abs(c[i]-O),i}); + } + } + + // Sort the angles in ascending order; + polp=sort(polp); + polm=sort(polm); + + void append(real[][] a, real[][] b, real[][] c) + { + polar=copy(a); + polar.append(b); + polar.append(c); + } + + if(polp.length > 0 && polm.length > 0) { + pair p1=c[round(polp[0][2])], + p2=c[round(polm[polm.length-1][2])], + p3=1/3*(O+p1+p2); + // We must be careful in rotation to join the paths + if((p2.x-p1.x)*(p3.y-p1.y)-(p2.y-p1.y)*(p3.x-p1.x) > 0) + append(new real[][]{{0,0,pivot}}, polp, polm); + else + append(new real[][]{{0,0,pivot}}, polm, polp); + } else + append(new real[][]{{0,0,pivot}}, polp, polm); + } + return sequence(new pair(int i){return c[round(polar[i][2])];}, n); +} + +/**/ +pair[] hull(pair[] c, real depthMin=infinity, real depthMax=0, + real angleMin=360, real angleMax=0, int pivot=-1) +{/*Graham scan method of computing a hull nodes of a given set of points. +With default parameter, return the convex hull. +depthMin and depthMax control the minimum and the maximum depth of cracks from the bounding box of c when it's possible. +angleMin and angleMax control the minimum and the maximum angle (in degrees) defined by three consecutive points when it's possible. +The origin for sorting polar coordinates is the point returned by pivot(c) if pivot < 0 else c[pivot].*/ + pair minb, maxb, center; + if(depthMax > 0) { + minb=minbound(c); + maxb=maxbound(c); + center=(minb+maxb)/2; + } + real dbound(pair M, pair dir) + { + return abs(M-minb-realmult(rectify(dir-center),maxb-minb)); + } + + pair[] nodes; + int n=c.length; + + nodes=polarSort(c,pivot); + nodes.cyclic=true; + + bool modified; + do { + modified=false; + for (int i=0; i < n; ++i) { + pair p1=nodes[i], p2=nodes[i+1], p3=nodes[i+2]; + if((p2.x-p1.x)*(p3.y-p1.y)-(p2.y-p1.y)*(p3.x-p1.x) < 0) + if((depthMax <= 0 || dbound(p2,0.5*(p1+p3)) > depthMax) || + (depthMin == infinity || dbound(p2,0.5*(p1+p3)) < depthMin) || + (angleMin >=360 || (degrees(p3-p2)-degrees(p1-p2) < angleMin)) || + (angleMax <=0 || (degrees(p3-p2)-degrees(p1-p2) > angleMax))) { + nodes.delete(i+1); + modified=true; + break; + } + } + } while(modified); + return nodes; +} diff --git a/pi_numeric.asy b/pi_numeric.asy new file mode 100644 index 0000000..5198bc1 --- /dev/null +++ b/pi_numeric.asy @@ -0,0 +1,313 @@ +pair sqrt(explicit pair z) +{ + return sqrt(abs(z))*expi(angle(z,false)/2); +} + +struct laguer { + pair x; + int its; +} + +real EPS=10*realEpsilon; +laguer laguer(pair[] a, int m=a.length-1, pair x) +{/* + Given the degree 'm' and 'm+1' complex coefficients a[0...m] of polynomial sum(a[i]*x^i), + and given a complex value "x", this routine improves 'x' by Laguerre's method until it converges to a root of the given polynomial. The value of x found and the number of iterations taken is returned as 'laguer' structure. + Adapted from http://www.nrbook.com/a/bookcpdf/c9-5.pdf + */ + + static real MR=8, MT=10, MAXIT=MT*MR; + int its; + laguer ol; + real[] ret; + int iter,j; + real abx,abp,abm,err; + pair dx,x1,b,d,f,g,h,sq,gp,gm,g2,ox=x; + static real[] frac={0, 0.5, 0.25, 0.75, 0.13, 0.38, 0.62, 0.88, 1}; + + laguer ret(){ + ol.x=x; + ol.its=its; + return ol; + } + for (iter=1; iter <= MAXIT ; ++iter) { + its=iter; + b=a[m]; + err=abs(b); + d=(0,0); f=d; + abx=abs(x); + for (int j=m-1; j >=0 ; --j) { + f=x*f+d; + d=x*d+b; + b=x*b+a[j]; + err=abs(b)+abx*err; + } + err *= EPS; + if(abs(b) <= err) return ret(); + g=d/b; + g2=g^2; + h=g2-2*f/b; + sq=sqrt((m-1)*(m*h-g2)); + gp=g+sq; + gm=g-sq; + abp=abs(gp); + abm=abs(gm); + if(abp < abm) gp=gm; + dx=(max(abp,abm) > 0.0) ? (m,0)/gp : + (1+abx)*(cos(iter),sin(iter)); + x1=x-dx; + if(x.x == x1.x && x.y == x1.y) return ret(); + if(iter%MT == 0) x=x1; + else x=x-frac[floor(iter/MT)]*dx; + } + abort("Too many iteration in laguer."); + return ret(); +} + +pair[] zroots(pair[] a, bool polish=true) +{/* + Given the complex coefficients a[0...m] of the polynomial sum(a[i]*x^i), + this routine returns all the complex roots by Laguer's method. + If 'polish' is true, the roots are polished (also by Laguer's method'); + Adapted from http://www.nrbook.com/a/bookcpdf/c9-5.pdf + */ + laguer L; + int m=a.length-1,its=L.its; + pair[] ad=copy(a); + pair x=L.x,b,c; + pair[] roots; + for (int j=m; j >= 1 ; --j) { + x=(0,0); + L=laguer(ad,j,L.x); + x=L.x; its=L.its; + if(abs(x.y) <= 2*EPS*abs(x.x)) x=(x.x,0); + roots[j-1]=x; + b=ad[j]; + for (int k=j-1; k >= 0 ; --k) { + c=ad[k]; + ad[k]=b; + b=x*b+c; + } + } + + if(polish) { + for (int j=0; j < m ; ++j) { + L.x=roots[j]; + L.its=its; + L=laguer(a,L.x); + roots[j]=L.x; + its=L.its; + } + } + for (int j=0; j < m ; ++j) { + pair x=roots[j]; + int i; + for (i=j-1; i >= 0 ; --i) { + if(roots[i].y == 0) break; + roots[i+1]=roots[i]; + } + roots[i+1]=x; + } + return roots; +} + +real sgn(real a, real b) +{ + return (b == 0) ? abs(a): sgn(b)*abs(a); +} + +void hqr(real[][] a, int n, real[] wr=new real[]{}, real[] wi= new real[]{}) +{/* + Finds all eigenvalues of an upper Hessenberg matrix a[1...n][1..n]. + The real and imaginary parts of eigenvalues are returned in wr[1...n] and wi[1...n], respectively. + Adapted from http://www.nrbook.com/a/bookcpdf/c11-6.pdf + */ + int nn,m,l,k,j,its,i,mmin; + real z,y,x,w,v,u,t,s,r,q,p,anorm=0; + for (i=1; i <= n ; ++i) + for (j=max(i-1,1); j <= n ; ++j) anorm += abs(a[i][j]); + nn=n;t=0; + while(nn >= 1) { + its=0; + do { + for (l=nn; l >= 2 ; --l) { + s=abs(a[l-1][l-1])+abs(a[l][l]); + if(s == 0) s=anorm; + if(abs(a[l][l-1])+s == s) { + a[l][l-1]=0; + break; + } + } + x=a[nn][nn]; + if(l == nn) { + wr[nn]=x+t; + wi[--nn]=0; + } else { + y=a[nn-1][nn-1]; + w=a[nn][nn-1]*a[nn-1][nn]; + if(l == (nn-1)) { + p=0.5*(y-x); + q=p^2+w; + z=sqrt(abs(q)); + x += t; + if(q >= 0) { + z=p+sgn(z,p); + wr[nn-1]=wr[nn]=x+z; + if(z != 0) wr[nn]=x-w/z; + wi[nn-1]=wi[nn]=0; + } else { + wr[nn-1]=wr[nn]=x+p; + wi[nn-1]=-(wi[nn]=z); + } + nn -= 2; + } else { + if(its == 30) abort("Too many iterations in hqr..."); + if(its == 10 || its == 20) { + t += x; + for(i=1; i <= nn; ++i) a[i][i] -= x; + s=abs(a[nn][nn-1])+abs(a[nn-1][nn-2]); + y=x=0.75*s; + w= -0.4375*s^2; + } + ++its; + for (m=nn-2; m >= l; --m ) { + z=a[m][m]; + r=x-z; + s=y-z; + p=(r*s-w)/a[m+1][m]+a[m][m+1]; + q=a[m+1][m+1]-z-r-s; + r=a[m+2][m+1]; + s=abs(p)+abs(q)+abs(r); + p /= s; q /= s; r /= s; + if(m == 1) break; + u=abs(a[m][m-1])*(abs(q)+abs(r)); + v=abs(p)*(abs(a[m-1][m-1])+abs(z)+abs(a[m+1][m+1])); + if(u+v == v) break; + } + for (i=m+2; i <= nn; ++i) { + a[i][i-2]=0; + if(i != m+2) a[i][i-3]=0; + } + for (k=m; k <= nn-1; ++k) { + if(k != m) { + p=a[k][k-1]; + q=a[k+1][k-1]; + r=0; + if(k != nn-1) r=a[k+2][k-1]; + if((x=abs(p)+abs(q)+abs(r)) != 0) { + p /= x; + q /= x; + r /=x; + } + } + if((s=sgn(sqrt(p^2+q^2+r^2),p)) != 0) { + if(k == m) { + if(l != m) a[k][k-1]=-a[k][k-1]; + } else a[k][k-1]=-s*x; + p += s; + x=p/s; y=q/s; z=r/s; q /= p; r /= p; + for (j=k; j <= nn; ++j) { + p=a[k][j]+q*a[k+1][j]; + if(k != nn-1) { + p += r*a[k+2][j]; + a[k+2][j] -= p*z; + } + a[k+1][j] -= p*y; + a[k][j] -= p*x; + } + mmin=nn < k+3 ? nn : k+3; + for (i=l; i <= mmin; ++i) { + p=x*a[i][k]+y*a[i][k+1]; + if(k != nn-1) { + p += z*a[i][k+2]; + a[i][k+2] -= p*r; + } + a[i][k+1] -= p*q; + a[i][k] -= p; + } + } + } + } + } + } while(1 < nn-1); + } +} + +real RADIX=8; +void balanc(real[][] a, int n=a[0].length) +{/* Given a matrix 'a[1...n][1..n]', this routine replaces it by a balanced matrix with identical eigenvalues. + A symmetric matrix is already balanced and is unaffected by this procedure. + The variable RADIX should be the machine's floating-point radix. + Adapted from http://www.nrbook.com/a/bookcpdf/c11-5.pdf + */ + int last=0, j, i; + real s, r, g, f, c, sqrdx=RADIX^2; + while(last == 0) { + last=1; + for (i=1; i <= n; ++i) { + r=c=0; + for (j=1; j <= n; ++j) + if(j != i) { + c += abs(a[j][i]); + r += abs(a[i][j]); + } + if(c != 0 && r != 0) { + g=r/RADIX; + f=1; + s=c+r; + while(c < g) { + f *= RADIX; + c *= sqrdx; + } + g=r*RADIX; + while(c > g) { + f /= RADIX; + c /= sqrdx; + } + if((c+r)/f < 0.95*s) { + last=0; + g=1/f; + for (j=1; j <= n; ++j) a[i][j] *= g; + for (j=1; j <= n; ++j) a[j][i] *= j; + } + } + } + } +} + +pair[] zroots(real[] a, bool polish=true) +{/* Return all the roots of a polynomial with real coefficients, sum(a[i]x^i). + The method is to construct an upper Hessenberg matrix whose eigenvalues are + the desired roots, and the use the routine 'balanc' and 'hqr'. + If polish is true, root-polishing by Newton-Raphson's method is applied. + Adapted from http://www.nrbook.com/a/bookcpdf/c9-5.pdf + */ + int m=a.length-1; + int j,k; + real[][] hess=new real[m+1][m+1]; + real[] rtr=sequence(new real(int n){return 0;},m+1), + rti=sequence(new real(int n){return 0;},m+1); + real xr,xi; + if(a[m] == 0) abort("Bad args in zroots."); + for (k=1; k <= m; ++k) { + hess[1][k]=-a[m-k]/a[m]; + for(j=2; j <= m; ++j) hess[j][k]=0; + if(k != m) hess[k+1][k]=1; + } + balanc(hess,m); + hqr(hess,m,rtr,rti); + for (j=2; j <= m; ++j) { + xr=rtr[j]; + xi=rti[j]; + for (k=j-1; k >= 1; --k) { + if(rtr[k] <= xr) break; + rtr[k+1]=rtr[k]; + rti[k+1]=rti[k]; + } + rtr[k+1]=xr; + rti[k+1]=xi; + } + pair[] roots=sequence(new pair(int n){return (rtr[n],rti[n]);},m+1); + roots.delete(0); + return roots; +}