top of page

Computer Graphics Lab

CSE:3016

Faculty In charge : Prof. Rajesh Kanna

Home: Welcome
Home: Blog2
Search

Object mapping

Writer's picture: theBloggerstheBloggers

Sample Image Taken :



Observed Specifics:

Lines=17

points=15

circles=13




Code for obtaining above figure Using Basic commands of graphics.h library in Dev C++ :


#include <graphics.h>

int main()

{

initwindow(1024, 915, "Dices");

circle(567, 593, 40);

line(335,435,741,309);

line(741,309,745,751);

line(745,751,329,905);

line(329,905,335,435);

/*floodfill(737,459,WHITE);*/

line(329,905,15,667);

line(15,667,9,267);

line(9,267,335,435);


circle(147, 563, 30);

circle(243,493, 30);

circle(61, 377, 30);

circle(67, 637, 25);

circle(233, 749, 30);

/*floodfill(259,631,WHITE);*/

line(9,267,387,171);

line(387,171,741,309);

line(391,175,389,59);

circle(385, 211, 30);

circle(359, 353, 30);

floodfill(393,291,WHITE);

line(389,59,709,107);

line(709,107,705,313);

circle(457, 131, 30);

circle(633, 183, 30);

/*floodfill(533,161,WHITE);*/

circle(789, 177, 30);

circle(971, 347, 30);

circle(685, 49, 30);

line(389,59,653,9);

line(653,9,1017,53);

line(1017,385,737,513);

floodfill(825,57,WHITE);


line(709,107,1017,53);

line(1017,53,1017,385);

/*floodfill(925,181,WHITE);*/

while (!kbhit( ))

{

delay(200);

}

return 0;

}


Flood filling the whole dice:



9 views0 comments

Recent Posts

See All

Comments


Home: Blog Feed

Meet theBloggers !

This Blog was created by students of Computer Graphics and Design Class (CSE3016) with sole purpose of relaying information of the different activities performed throughout the course period.

theBloggers
Ibra Nafis - 17BCE1230

Bhavya S Chauhan - 17BCE1270

Home: About

© Proudly created with Wix.com

bottom of page