Ici, je présente le graphe du solide de Johnson J92 : l'hébesphéno-rotonde triangulaire. En fait, je donne deux versions du graphe (il s'agit du même graphe : seul l'arrangement des sommets est différent)
Voici le code permettant d'obtenir ces deux graphes :
- Code: Tout sélectionner
\begin{texgraph}[file,call]
Cmd [Fenetre(-3+4*i,15-5*i,1+i), Marges(0.5,0.5,0.5,0.5), Border(0)];
[theta:=0.6261, phi:=1.6036, OriginalCoord(1),IdMatrix()];
[IdMatrix3D(), ModelView(ortho)];
Include
"graphes.mac";
"PolyedresII.mac";
Mac
Init = [ Matrice:=[0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,
0,0,1,1,0,1,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,
1,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,
1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,
1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,0,
0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0],
NbSommets:=20,
PosSommets:=[0,i,-0.86602540378443-0.5*i,0.86602540378443-0.5*i,-0.86602540378443+0.5*i,
-i,0.86602540378443+0.5*i,-1.73205080756888+i,-2*i,1.73205080756888+i,-1.73205080756888-i,
1.73205080756888-i,2*i,-2,-1-1.73205080756888*i,1-1.73205080756888*i,2,1+1.73205080756888*i,
-1+1.73205080756888*i,3-3*i],
typeGraphe:=-1,
Rayon:=3,
rayon:=0.25,
bouclescale:=1,
dotstyle:=-1,
linesep:=0.5,
arrowwidth:=8,
angledep:=Nil,
angledep:=Nil,
arrowposboucle:=[0.265,0.765],
arrowposarete:=[0.25,0.75],
ReCalc() ];
Sommet1 = "T";
optionsSommet1 = "[Color:=white, FillColor:=limegreen]";
Sommet2 = "P";
optionsSommet2 = "[Color:=black, FillColor:=gold]";
Sommet3 = "P";
optionsSommet3 = "[Color:=black, FillColor:=gold]";
Sommet4 = "P";
optionsSommet4 = "[Color:=black, FillColor:=gold]";
Sommet5 = "T";
optionsSommet5 = "[Color:=white, FillColor:=limegreen]";
Sommet6 = "T";
optionsSommet6 = "[Color:=white, FillColor:=limegreen]";
Sommet7 = "T";
optionsSommet7 = "[Color:=white, FillColor:=limegreen]";
Sommet8 = "C";
optionsSommet8 = "[Color:=white, FillColor:=navy]";
Sommet9 = "C";
optionsSommet9 = "[Color:=white, FillColor:=navy]";
Sommet10 = "C";
optionsSommet10 = "[Color:=white, FillColor:=navy]";
Sommet11 = "T";
optionsSommet11 = "[Color:=white, FillColor:=limegreen]";
Sommet12 = "T";
optionsSommet12 = "[Color:=white, FillColor:=limegreen]";
Sommet13 = "T";
optionsSommet13 = "[Color:=white, FillColor:=limegreen]";
Sommet14 = "T";
optionsSommet14 = "[Color:=white, FillColor:=limegreen]";
Sommet15 = "T";
optionsSommet15 = "[Color:=white, FillColor:=limegreen]";
Sommet16 = "T";
optionsSommet16 = "[Color:=white, FillColor:=limegreen]";
Sommet17 = "T";
optionsSommet17 = "[Color:=white, FillColor:=limegreen]";
Sommet18 = "T";
optionsSommet18 = "[Color:=white, FillColor:=limegreen]";
Sommet19 = "T";
optionsSommet19 = "[Color:=white, FillColor:=limegreen]";
Sommet20 = "H";
optionsSommet20 = "[Color:=white, FillColor:=crimson]";
aux = "[LineStyle:=noline]";
poids1_1 = "";
auxOptionsAretes = "[LineStyle:=noline]";
userOptions = "Liste(Set(rayon,0.25),Set(Width,thicklines),Set(FillColor,limegreen))";
optionsArete8_20 = "[LineStyle:=noline]";
optionsArete9_20 = "[LineStyle:=noline]";
optionsArete10_20 = "[LineStyle:=noline]";
optionsArete11_20 = "[LineStyle:=noline]";
optionsArete12_20 = "[LineStyle:=noline]";
optionsArete13_20 = "[LineStyle:=noline]";
Graph objet1 = [
tMin:=-2.7,tMax:=4.2,DotScale:=1+i,
Fenetre(-3-5*i, 15+4*i, 1+i),
$Mat:=ReadData("GrapheJ92.txt", 1),
PosSommets:=[0,
i, exp(-5*i*pi/6), exp(-i*pi/6),
exp(5*i*pi/6), -i, exp(i*pi/6),
2*exp(5*i*pi/6), -2*i, 2*exp(i*pi/6),
2*exp(-5*i*pi/6), 2*exp(-i*pi/6), 2*i,
-2, 2*exp(-2*i*pi/3), 2*exp(-i*pi/3), 2, 2*exp(i*pi/3), 2*exp(2*i*pi/3),
3-3*i],
DefMatrice(Mat),
DefLabels("T", "", "P", "", "P", "", "P", "", "T", "", "T", "", "T", "", "C", "", "C", "", "C", "",
"T", "", "T", "", "T", "", "T", "", "T", "", "T", "", "T", "", "T", "", "T", "", "H", ""),
DefOptionsAretes([8, 20, 9, 20, 10, 20, 11, 20, 12, 20, 13, 20], "[LineStyle:=noline]"),
DefOptionsSommets(20, "[Color:=white, FillColor:=crimson]",
[2, 3, 4], "[Color:=black, FillColor:=gold]",
[8, 9, 10], "[Color:=white, FillColor:=navy]",
[1, 5, 6, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19], "[Color:=white, FillColor:=limegreen]"),
{ Tracé des six arêtes non droite }
Width:=thicklines,
$P:=PosSommets[20],
$P1:=PosSommets[8], $P2:=PosSommets[9], $P3:=PosSommets[10],
$P4:=PosSommets[11], $P5:=PosSommets[12], $P6:=PosSommets[13],
Path([P1, (2*P1+P)/3-0.8*exp(i*pi/3)*(P-P1), (P1+2*P)/3-0.8*exp(2*i*pi/3)*(P-P1), P, bezier,
P2, move, ((P2+P)/2)-0.25*i*(P-P2), P, bezier,
P3, move, ((P3+P)/2)+0.25*i*(P-P3), P, bezier,
P4, move, ((P4+P)/2)-0.65*i*(P-P4), P, bezier,
P5, move, P, line,
P6, move, (2*P6+P)/3+0.65*exp(2*i*pi/3)*(P-P6), (P6+2*P)/3+0.65*exp(i*pi/3)*(P-P6), P, bezier]),
{ Tracé du reste du graphe }
Dgraphe([rayon:=0.25, Width:=thicklines, FillColor:=limegreen]),
{ Affichage du polyèdre J92 }
SetMatrix([10-i, 3, 3*i]),
opacity:=0.75, StyleL:=Thicklines, LineCap:=round,
HebesphenoRotondeT(Origin, vecI, A, B, C, D, E),
Build3D(A, B, C, D, E),
Display3D(),
{ Titre du graphique }
SetMatrix([0, 1, i]),
LabelStyle:=center, LabelSize:=Large,
Label((Xmin+Xmax)/2+i*Ymax, "Graphe de l'hébesphéno-rotonde triangulaire ($\mathcal{J}_{92}$)"),
];
\end{texgraph}
et le fichier dans lequel j'ai enregistré ma matrice :
- Code: Tout sélectionner
0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0
1 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0
1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0
0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1
0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1
0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0