From 8108949bb378d8307b952e36c53f63d2cfe0d30a Mon Sep 17 00:00:00 2001 From: dartoisl Date: Thu, 2 Feb 2023 17:24:21 +0100 Subject: [PATCH] ajout De la fonction de representation des graphes --- TP/fonctionVisuelGraphe.c | 41 +++++++++++++++++++++++++++++++++++++ code/fonctionVisuelGraphe.c | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 TP/fonctionVisuelGraphe.c create mode 100644 code/fonctionVisuelGraphe.c diff --git a/TP/fonctionVisuelGraphe.c b/TP/fonctionVisuelGraphe.c new file mode 100644 index 0000000..e088802 --- /dev/null +++ b/TP/fonctionVisuelGraphe.c @@ -0,0 +1,41 @@ +#include +#include + + +void visuelGraphe(graphe g){ + int taille=1000; + int origine=taille/2; + int distance=4*origine/5; + int tailleVert=taille/20; + InitialiserGraphique(); + CreerFenetre(10,10,taille,taille); + + int i,j; + int x,y; + char* nV=malloc(2); + *nV='1'; + *(nV+1)='\0'; + int* cX=calloc(g.ordre,sizeof(int)); + int* cY=calloc(g.ordre,sizeof(int)); + for(i=0;i +#include + + +void visuelGraphe(graphe g){ + int taille=1000; + int origine=taille/2; + int distance=4*origine/5; + int tailleVert=taille/20; + InitialiserGraphique(); + CreerFenetre(10,10,taille,taille); + + int i,j; + int x,y; + char* nV=malloc(2); + *nV='1'; + *(nV+1)='\0'; + int* cX=calloc(g.ordre,sizeof(int)); + int* cY=calloc(g.ordre,sizeof(int)); + for(i=0;i