Árbol fractal en BorlandC para DOS
Árbol fractal en BorlandC para DOS
/*arbol3*/ /*Fernando Galindo Soria*/ #include <graphics.h> #include <math.h> void arbol(int,int,int,int); void arbolb(int,int,int,int); int ind; void main() { int gd=DETECT,gm; initgraph(&gd,&gm,""); ind=1; arbol(300,300,70,90); getch(); closegraph(); } void arbol(int x0,int y0,int l,int an) { int x1,y1; if(bioskey(2)!=0x04) if (l > ind ) { x1=x0-(l*cos(an/57.29578)); y1=y0-(l*sin(an/57.29578)); line(x0,y0,x1,y1); arbolb(x1,y1,l/1.5,an-47); arbolb(x1,y1,l/1.5,an+67); } } void arbolb(int x0,int y0,int l,int an) { int x1,y1; if(bioskey(2)!=0x04) if (l > ind ) { x1=x0-(l*cos(an/57.29578)); y1=y0-(l*sin(an/57.29578)); line(x0,y0,x1,y1); arbol(x1,y1,l,an-17); /* arbolb(x1,y1,l,an+57);*/ } }
Quizá te interese :
Draw an asterisk tree with Java Uno de los ejemplos clásicos de uso de ciclos en los lenguajes ...
#include #include char bufer[500]; typedef struct swav { char Riff[4]; long longRi ...
Juego del Gato en C. /*Juego de Gato Heurístico Autor:Jesús M.Olivares Ceja Desarrollad ...





