Beruflich Dokumente
Kultur Dokumente
Guided
Ms. Suhasini Assistant
1|Page
Certificate
This is to certify that this dissertation entitled Mickey Mouse Program submitted for the degree of Bachelors of computer applications (BCA hons) in the subject of Computer Application Department to the Lovely Professional University (Phagwara), work carried out by Sandeep Singh and Sahil Talwar Registration no. 10805743 and 10805845 under the guidance in partial fulfillment of the requirement for the course: Computer Graphics (CAP 367)
2|Page
Declaration
I hereby declare that the project work entitled MICKEY MOUSE PROGRAM is an authentic record of my own work carried out at Lovely Professional University as requirements of project for the award of degree of BCA (Hons.) Lovely Professional University, Phagwara, under the guidance of Ms. Suhasini Monga during February to May, 2011.
3|Page
Sandeep Singh Sahil Talwar RA3802A20 RA3802A21 Reg. No. 10805743 108058 45
Acknowledgement
My deep gratitude, fullness which I have for my madam, Ms. Suhasini Monga , under whose guidance, advice, help, inspiration and encouragement it is easy for me to make this project and also for his contribution in coordination and cooperating us during the course of development. He enriched us with knowledge whenever we reached him. I am also thankful to my colleagues with whom I have fruitful discussions which have helped us a lot in giving a final shape to the program. At last but not the least I express our heartiest gratitude towards almighty for providing us the environment and support.
4|Page
Sandeep Singh Sahil Talwar RA3802A20 RA3802A21 Reg. No. 10805743 10805 845
CONTENTS
Sr. No.
1 2 3
TOPICS
Project Name and Description Profile of the problem Existing System Existing Software DFD of present system
Page No.
6 7 7-8 8
5|Page
8 9
Problem Analysis Problem Definition Feasibilty Analysis Project Plan Software Requirement Analysis Introduction General Description Specific Requirements Design System Design Detailed Design Pseudo code Testing Functional Testing Structural testing Implementation Project Legacy Current status of project Remaining area of concern User Manual Source Code Final Output Bibliography
9 9
10
11-14
14-15
15
10 11 12
15 16-21 22-23 24
6|Page
1. Project Name and Description: Name of Project:- Mickey Mouse Program Project Description:The project includes different modules that are needed to generate different pictures into a single animated picture (include motion of pictures) in same program in a same time. In this project we can display a picture of Mickey Mouse with the help of motion as it looks like animated. The project Mickey mouse program will be made by the use of arcs, lines, circle, ellipse etc. We can add some colour to Mickey mouse so that it will be seen attractive. This project includes animated Mickey mouse that includes smiley face using arcs, lines, circles, ellipse etc. This application is easy to use and display an animated Mickey mouse. It can use in animation or animated movies. It will be the full source of entertainment. Header Files in our project: #include<graphics.h>: It is used to draw graphical objects in our project. #include<conio.h>: It is a C header file used in old MS-DOS compilers to create text user interfaces. #include<dos.h>: It is used to move the car in our project. #include<stdio.h>: It is used for printf and scanf in our project. In this project, We used different predefined functions to create Mickey Mouse Program. Some of the in built functions which we have mostly used to create Mickey Mouse Program are: 1. line() : This function helped us in making doors, mirrors, bumper, light, rear etc of the car. 2. Ellipse() : Ellipse function is used in our project for making the roof and tyers of the car. 3. floodfill() : This function helped us in our project to fill a specific part to make it more attractive. 4. setfillstyle() : This function helped us making different patterns on the car such as dotted lines etc. 5. outtextxy(): It is used in our project to place text on the output screen.
7|Page
It is time consuming. It is very tedious. It includes a lot of paper work. It is very complex and not easy to understand.
3. Existing System:-
a) Exiting software:- Not any specific system for this at this time. b) DFD for Present system:-
8|Page
Start
Header Files
Datatypes
Declarations
Assigning variables
Designing
Colors,Patter ns
Coding
Animations
Errors
Errors
Display Output
END
9|Page
4. Problem Analysis:In this projects we face two problems Void left () function----this function help to club the pixels from one place to another. Set fill / flood fill---These function help to change the view of the project like pattern of colour, its colour /design.
Operational feasibility:
This system is totally feasible respect to operations and functionality Calculation can be done by simple mathematics.
Cost feasibility:
No additional hardware is required to develop the program We need Turbo c++ and DosBox.
Lines Ellipse flood fill set-fill Then we start to making the project.
11 | P a g e
c. Specific Requirements :-It will work on windows only because .exe files do not work on linux or unix. Compiler is needed to edit the project in future in case of any user requirements.
12 | P a g e
6. Design----
a. System Design:- Systems design is the process of defining the components, modules, interfaces, and data for a system to satisfy specified requirements and we have divided our project into different modules for its better understanding and to make it user friendly. b. Detailed design:-
Second Phase:-
13 | P a g e
Final Output:-
14 | P a g e
c. Pseudo code:- An algorithm is a procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed. An algorithm is merely the sequence of steps taken to solve a problem. The steps are normally "sequence," "selection, " "iteration," and a case-type statement. In C, "sequence statements" are imperatives. The "selection" is the "if then else" statement, and the iteration is satisfied by a number of statements, such as the "while," " do," and the "for," while the casetype statement is satisfied by the "switch" statement. Pseudo code is an artificial and informal language that helps programmers develop algorithms. Pseudo code is a "text-based" detail (algorithmic) design tool. The rules of Pseudo code are reasonably straightforward. All statements showing "dependency" are to be indented. These include while, do, for, if, switch. Examples below will illustrate this notion. while(!kbhit()) { if(i==0) { setfillstyle(1,15); setcolor(15); ellipse(210,133,0,360,10,10);//left eye ball ellipse(265,133,0,360,10,10);//right eye ball setcolor(0); ellipse(210,133,0,360,3,3);//left eye ball ellipse(265,133,0,360,3,3);//right eye ball floodfill(210,133,15); floodfill(265,133,15); setcolor(0); putimage(391,209,buf,1); firstleft(); 15 | P a g e
setcolor(15); secondleft(); putimage(409,224,buf,0); i=1; } else { setfillstyle(1,0); setcolor(0); ellipse(210,133,0,360,10,10);//left eye ball ellipse(265,133,0,360,10,10);//right eye ball floodfill(210,133,0); floodfill(265,133,0); setcolor(15); ellipse(210,133,0,360,3,3);//left eye ball ellipse(265,133,0,360,3,3);//right eye ball floodfill(210,133,15); floodfill(265,133,15); setcolor(0); putimage(409,224,buf,1); secondleft(); setcolor(15); firstleft(); putimage(391,209,buf,0); i=0; } delay(300); }
7. Testing:- We test the project after completing the step by step.after complete every
step of project we check it if step run properly then we start coding for next step.it help to making project easily..
16 | P a g e
operates correctly. The coverage measurements that fall into this category are: statement, branch, condition and expression, and path coverage.
8. Implementation
a. Implementation of the project Implementation of the project in the organization will include various things. Organization should have compatible hardware and software to implement this. And Executable file of this project is given to end users so that they can use the software.
9. Project Legacy:- We dont copy any type of code of the project. We make the
project with the help of two books-
Computer Graphics C Version LET US C ANSI C And with own knowledge/and teacher help.
a. Current status of project:- The current status is the project the totally
complete. Nothing is rest.
17 | P a g e
10.User Manual:- First of all you have to install turbo c++ in your operating system.
After installation open the (c:\) drive from My computer. And then save the file in C:\turbo\Tc folder. Open your turbo c++. Then from menu bar open the newmickey.c file and run it.
18 | P a g e
11.Source code:-
#include<graphics.h> #include<dos.h> #include<conio.h> #include<alloc.h> void *buf; void firstleft(); void secondleft(); void main() { int gd=DETECT,gm,i=0,x,y,area; initgraph(&gd,&gm,"tc:\bgi"); rectangle(0,0,getmaxx(),getmaxy()); outtextxy(250,10,"MICKEY MOUSE PROGRAM"); outtextxy(520,100,"SAHIL TALWAR"); outtextxy(518,120,"SANDEEP SINGH"); arc(240,120,40,140,70); ellipse(165,80,10,280,20,20); ellipse(315,80,-100,170,20,20); arc(235,120,163,215,70); arc(245,120,-35,17,70);
19 | P a g e
ellipse(193,178,85,280,40,20); ellipse(283,178,-100,95,40,20); ellipse(238,199,180,0,39,50); ellipse(213,123,44,240,33,40); ellipse(262,123,-60,135,33,40); ellipse(210,123,0,360,13,20);//left eye ellipse(265,123,0,360,13,20);//right eye ellipse(210,133,0,360,10,10);//left eye ball ellipse(265,133,0,360,10,10);//right eye ball ellipse(210,133,0,360,3,3);//left eye ball ellipse(265,133,0,360,3,3);//right eye ball ellipse(238,160,0,360,10,13);//nose arc(240,125,228,312,68);//mouth arc(240,120,230,310,72);//mouth setfillstyle(1,4); floodfill(238,160,15);//nose setfillstyle(1,5); floodfill(210,113,15); floodfill(265,113,15); setfillstyle(1,6); floodfill(210,100,15); setfillstyle(1,0); floodfill(315,80,15);/*setfillstyle(1,4); floodfill(238,160,15);//nose
20 | P a g e
setfillstyle(1,15); floodfill(210,113,15); floodfill(265,113,15); setfillstyle(1,9); floodfill(210,100,15); setfillstyle(1,1); floodfill(315,80,15); */ moveto(203,220); lineto(203,260); lineto(183,260); lineto(183,350); lineto(293,350); lineto(293,260); lineto(273,260); lineto(273,220); moveto(183,350); lineto(173,460); lineto(213,460); lineto(238,400); lineto(263,460); lineto(303,460); lineto(293,350); moveto(173,460); lineto(143,478);
21 | P a g e
lineto(213,478); lineto(213,460); moveto(263,460); lineto(263,478); lineto(333,478); lineto(303,460); line(238,400,238,350); //right hand moveto(183,260); lineto(113,310); lineto(183,375); moveto(183,280); lineto(137,310); lineto(181,353); setfillstyle(8,4); floodfill(190,300,15); setfillstyle(6,9); floodfill(223,400,15); setfillstyle(6,9); floodfill(253,400,15); setfillstyle(9,2); floodfill(173,470,15); floodfill(303,470,15); /*setfillstyle(2,13);
22 | P a g e
floodfill(190,300,15); setfillstyle(1,5); floodfill(223,400,15); setfillstyle(1,5); floodfill(253,400,15); setfillstyle(1,6); floodfill(173,470,15); floodfill(303,470,15);*/ //fingers secondleft(); ellipse(413.5,228,0,180,3.5,3.5); line(420,240,433,240); line(423,247,440,247); line(413,240,410,228); line(417,228,420,240); ellipse(433,243.5,-90,90,3.5,3.5); line(423,254,440,254); ellipse(440,250.5,-90,90,3.5,3.5); ellipse(430,257,-90,90,3,3); line(413,260,430,260); area=imagesize(409,224,444,261); buf=malloc(area); getimage(409,224,444,261,buf); while(!kbhit())
23 | P a g e
{ if(i==0) { setfillstyle(1,15); setcolor(15); ellipse(210,133,0,360,10,10);//left eye ball ellipse(265,133,0,360,10,10);//right eye ball setcolor(0); ellipse(210,133,0,360,3,3);//left eye ball ellipse(265,133,0,360,3,3);//right eye ball floodfill(210,133,15); floodfill(265,133,15); setcolor(0); putimage(391,209,buf,1); firstleft(); setcolor(15); secondleft(); putimage(409,224,buf,0); i=1; } else { setfillstyle(1,0); setcolor(0);
24 | P a g e
ellipse(210,133,0,360,10,10);//left eye ball ellipse(265,133,0,360,10,10);//right eye ball floodfill(210,133,0); floodfill(265,133,0); setcolor(15); ellipse(210,133,0,360,3,3);//left eye ball ellipse(265,133,0,360,3,3);//right eye ball floodfill(210,133,15); floodfill(265,133,15); setcolor(0); putimage(409,224,buf,1); secondleft(); setcolor(15); firstleft(); putimage(391,209,buf,0); i=0; } delay(300); } getch(); } void firstleft() { moveto(293,260);
25 | P a g e
lineto(353,276); lineto(395,223); moveto(293,280); lineto(355,296); lineto(395,245); } void secondleft() { moveto(293,260); lineto(363,280); lineto(413,240); moveto(293,280); lineto(363,300); lineto(413,260); }
26 | P a g e
Final Output:-
27 | P a g e
28 | P a g e
29 | P a g e