How To Create Concentric Ellipse Animation in C Or C++ (Computer Graphics)

                                                                       PROJECT BY

(SIMPLIFY LEARN PROGRAMMING) 

ON

CONCENTRIC ELLIPSE ANIMATION


SOURCE CODE:


#include<stdio.h>

#include<graphics.h>

#include<conio.h>

#include<dos.h>

#include<stdlib.h>

void main()

{

int i,r1,r2,n,j=2,xr=200,yr=100;

int gd=DETECT,gm;

initgraph(&gd,&gm,"C:\\TC\\BGI");

printf("Enter The No. of Ellipse:");

scanf("%d",&n);

r1=xr/n;

r2=yr/n;

for(i=0;i<n;i++)

{

setfillstyle(1,j);

ellipse(300,200,0,360,xr,yr);

if(j==10)

j=2;

xr=xr-r1;

yr=yr-r2;

j++;

}

getch();

}



OUTPUT:





Comments

Popular posts from this blog

How To Draw a Butterfly Animation in C (Computer Graphics)

How To Draw Sunrise Animation in C++ (Computer Graphics)

How To Draw a Bouncing Ball Animation in C++ (Computer Graphics)