int main() { unsigned d = 0, c = 0, color = 0, lines[473][2]; srand(*((unsigned*)0x46c)); setmode(0x13); /* set to color graphics mode, clearing screen */ bresenham_circle(160, 100, 75, 15); for (d = 0; d < 64000l; d++) { if(*((char far*)0xa0000000l + d) == 15) lines[c][1] = d / 320, lines[c++][0] = d % 320; } while (*((char far*)0x41a) == *((char far*)0x41c)) { bresenham_circle(160, 100, (++color & 127) + 80, (color / 5 ) & 255); d = rand() % 465 + 4; c = (d + 3) % 472; bresenham_line(lines[d][0], lines[d][1], lines[c][0], lines[c][1], color & 255); } setmode(0x03); /* set to color text mode, clearing screen */ getch(); return 0; }
// Function to draw two concentric circles void concentric_circles(void) { /* Clears buffers to preset values */ glClear(GL_COLOR_BUFFER_BIT); int radius1 = 100; bresenham_circle(radius1); }
void main(void) { int i=0; randomize(); setmode(0x13); while(!kbhit()) { bresenham_line(random(SCREEN_WIDTH), random(SCREEN_HEIGTH), random(SCREEN_WIDTH), random(SCREEN_HEIGTH), i = ++i % 64); bresenham_circle(random(SCREEN_WIDTH), random(SCREEN_HEIGTH), random(50), i = ++i % 64); } getch(); setmode(0x03); /* set to color text mode, clearing screen */ }