noussagh
Messages postés22Date d'inscriptionvendredi 13 novembre 2009StatutMembreDernière intervention20 mai 2011
-
28 mars 2011 à 01:58
boujerra
Messages postés11Date d'inscriptionlundi 5 mars 2007StatutMembreDernière intervention25 novembre 2012
-
6 déc. 2011 à 21:05
bonsoir
je programme en C et j'aimerai dessiner une courbe m'indiquant la position de mon robot à chaque instant :)est il possible? si oui veuillez me donner quelques idées
j'utilise visual studio 2008 et une application console win 32
merci
boujerra
Messages postés11Date d'inscriptionlundi 5 mars 2007StatutMembreDernière intervention25 novembre 2012 6 déc. 2011 à 21:05
voilà ce que t'as besoin pour commecer
include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
/* request auto detection */
int gdriver = DETECT, gmode, errorcode;
int midx, midy;
int radius = 100;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "");
/* read result of initialization */
errorcode = graphresult();
if (errorcode != grOk) /* an error occurred */
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* terminate with an error code */
}