Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

xor eax,eax



Home

Fireworks

SparcZ

Win32 asm

Kunthrandum

Linkz page

Guestbook

Misc...

About me




XXXXXXXX
1913

radiation warning feltronium
Download - MSDOS executabe, with C source



#include <stdio.h>
#include <math.h>
#include <conio.h>
#include <graphics.h>
#include <stdlib.h>
#include <dos.h>

double cam=0;
typedef struct point {
	int x;
	int y;
	double a;   // angle
	int r;      // radius
	int c; };   // color

point p[200];

void rot(int n)     // i mean rotate
{
     p[n].y=(int)(sin(cam+p[n].a)*p[n].r)+240; // x = sin@ * radius
     p[n].x=(int)(cos(cam+p[n].a)*p[n].r)+320; // y = cos@ * radius
}
void main()
{
int gdriver = DETECT, gmode;
registerbgidriver(EGAVGA_driver);
initgraph(&gdriver, &gmode, "");
cleardevice();
printf("Programmed by Rony BC 10'1999\nHit any key to continue..\n");
getch();
cleardevice();
for(int n=1;n<200;n=n+2) {
        p[n].a=((double)random(160))/10;
        p[n].r=random(300);
        p[n].c=random(16);
        p[n-1].a=p[n].a+0.5;
        p[n-1].r=p[n].r;
        p[n-1].c=p[n].c+1;  }
while(!kbhit())
{
        for(n=0;n<200;++n) rot(n);
        for(n=0;n<200;++n) {
                ++p[n].r;
                if(p[n].r>300) p[n].r=0;
                putpixel(p[n].x,p[n].y,p[n].c);  }
        delay(20);
        for(n=0;n<200;++n) putpixel(p[n].x,p[n].y,0);
        cam+=.01;
}
getch();
while(!kbhit())
{
        for(n=0;n<200;++n) rot(n);
        for(n=0;n<200;++n) {
                ++p[n].r;
                if(p[n].r>300) p[n].r=0;
                putpixel(p[n].x,p[n].y,p[n].c);  }
        delay(10);
        cam+=.01;
}
getch();

}