Create temple



Here we are going to teach you to create a new beautiful object.This article will tell you how can you create a temple by using simple c-graphics functions.To learn to draw temple in c go through the following code:

#include<stdio.h>

#include<conio.h>

#include<graphics.h>

void main()

{

int gd=DETECT,gm;

initgraph(&gd,&gm,"");

line(200,400,400,400);

line(205,400,205,350);

line(395,400,395,350);

line(205,350,395,350);

line(205,350,197,344);

line(395,350,403,344);

line(197,344,403,344);

line(197,344,212,326);

line(403,344,388,326);

line(212,326,388,326);

line(290,400,290,380);

line(310,400,310,380);

ellipse(300,380,0,180,10,15);

line(212,326,212,295);

line(388,326,388,295);

line(212,295,388,295);

line(212,295,204,289);

line(388,295,396,289);

line(204,289,396,289);

line(204,289,219,271);

line(396,289,381,271);

line(219,271,381,271);

line(294,325,294,315);

line(310,325,310,315);

ellipse(302,315,0,180,8,13);

line(219,271,219,248);

line(381,271,381,248);

line(219,248,381,248);

line(219,248,211,242);

line(381,248,389,242);

line(211,242,389,242);

line(211,242,226,224);

line(389,242,374,224);

line(226,224,374,224);

line(298,270,298,264);

line(310,270,310,264);

ellipse(304,264,0,180,6,11);

line(226,225,226,206);

line(374,224,374,206);

line(226,206,374,206);

line(226,206,218,200);

line(374,206,382,200);

line(218,200,382,200);

line(218,200,233,182);

line(382,200,367,182);

line(233,182,367,182);

line(297,218,297,224);

line(308,218,308,224);

ellipse(303,220,0,180,5,9);

line(233,182,233,167);

line(367,182,367,167);

line(233,167,367,167);

line(233,167,225,161);

line(367,167,375,161);

line(225,161,375,161);

line(225,161,270,130);

line(375,161,330,130);

ellipse(300,130,180,0,30,20);

line(270,130,330,130);

line(270,130,300,110);

line(330,130,300,110);

line(300,110,300,90);

circle(300,85,4);

line(300,181,300,176);

line(305,181,305,176);

ellipse(302,180,0,180,3,7);

getch();

closegraph();

}



In the above code we used the simple circle,ellipse and line functions in order to draw temple on your screen.You can study these functions in detail from our tutorial Graphics in C.Here is the output of the above code:



Output

c_graphics