0% found this document useful (0 votes)
11 views

Computer Graphics Microproject Group File

Cgr project

Uploaded by

Mr R K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Computer Graphics Microproject Group File

Cgr project

Uploaded by

Mr R K
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

lOMoARcPSD|48049738

Computer Graphics Microproject Group File

Computer Engineering (Government Polytechnic, Awasari)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

Government Polytechnic Amravati

Vision
To be a vibrant technical institute of global repute contributing
towards the needs of industries & society.

Mission

M1. To develop competent diploma engineers suitable for contemporary


industrial environment.
M2. To include socially accepted ethics & values among budding engineers.
M3. To Nurture innovations and entrepreneurship .
M4. To produce engineers with psychomotor & cognitive skills committed to
lifelong learning.

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

Computer Department

Vision
Provide skilled professionals in Computer Engineering to
contribute towards the advancement of technology useful for
society and industrial environment.

Mission
M1.Impart need based and value based education by providing exposure of
latest tools and technologies in the area of computer engineering to satisfy
the stakeholders.
M2.Upgrade and maintain facilities for quality technical education with
continuous effort for excellence in Computer Engineering.

M3. Train students with Computer Engineering knowledge to apply it in the


general disciplines of design, deployment of software and integration of
existing technologies for E governance and for benefit of society.

M4. Provide a learning ambience to enhance innovations, problem solving


skills, leadership qualities, team spirit and ethical responsibilities.

M5. Provide an academic environment and consultancy services to the


industry and society in the area of Computer Engineering.

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

MICRO-PROJECT REPORT ON
Design a rotating fan.
In Partial fulfillment of Diploma in Computer Engineering
(Sixth Semester)
In the subject of
CM5460 Computer Graphics
By

Mr./Ms. 19CM064 – Anand Umbarkar


19CM066 - Sarthak Vinchurkar
19CM067 – Abhishek Wankhade
19CM068 – Gayatri Yaul
19CM069 – Vishakha Yawle
Submitted To

Government Polytechnic
Amravati
(An Autonomous Institute of Govt. of Maharashtra)

Under the guidance of

Prof. V. M. Aswar
Lecturer in Computer Graphics
Department of Computer Engineering
Government Polytechnic Amravati

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

Government Polytechnic, Amravati.


(An Autonomous Institute of Govt. of Maharashtra)

Department of Computer Engineering

Certificate

This is to certify that Mr./Ms. Anand Umbarkar ,Sarthak


Vinchurkar , Abhishek Wankhade, Gayatri Yaul, Vishakha
Yawle Identity Code. 19CM064 , 19CM066 , 19CM067 ,
19CM068 , 19CM069 of Sixth semester Diploma in Computer
Engineering has satisfactorily completed the microproject entitled
“Design a Rotating fan.” for the academic year 2021-22 as
prescribed in curriculum.

Place: Amravati Lecturer in Computer Graphics


Date: / /2022 - Prof. V.M. Aswar

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

1
Annexure-I
PART A- Plan
Micro-Project Proposal

Title of Micro Project:


Design a Rotating Fan

0.1 Brief Introduction: -


Computer Graphics is the creation of pictures with the help of a
computer. The end product of the computer graphics is a picture it may
be a business graph, drawing, and engineering. This project is about
the Design a Rotating fan. We are implementing it using using
different primitives available in C Graphics library and combining
them together in a required manner.

0.2 This Micro-Project aims at: -


1. To Design a Rotating Fan.
2. To implement built-in C graphics function in program.
3. Writing a C program for rotating fan.

0.3 Cos Included: -


CO3: Use transformation techniques to rotate the object.
0.4 Actual Procedure to be Followed: -
We followed steps mentioned below for completing
microproject:

1. first of all , we discuss about the Microproject topic and finalize the
topic Design a Rotating fan .
2. Then some discussion were on the topic. Then we gather
information about the project and collect important points which we
are used in our project .
3. Then we analyzed the data and developed the program using built-
in graphics function and executed it .
4. Then the final report is made.

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

0.5 Resources Required (major resources such as raw material, some


machining facility, software, etc)

Name of Specifications Qty Remarks


Resource/material
Computer / laptop Intel core i5.version 7 1
Google Chrome PC with a 1 gigahertz (GHz) 32-bit 1
(x86) or 64-bit (x64) processor.
Windows 10 32-bit with Service
Pack 1 (SP1) or higher

Turbo C++ 1
Turbo C++ 3.2

0.6 Outputs of the Micro-Projects


(Drawings of the prototype, drawings of survey, presentation of collected
data, findings etc.)

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

0.7 Skill Developed / Learning outcome of this Micro-Project


By successfully completing the micro project we are able to learned about how
to rotate graphical object using C program. And how to use built-in graphics
function in c program.

0.8 Assessment by Faculty as per Rubrics


Process Product Total Marks Signature of
Assessment Assessment (05) Faculty
(03) (02)

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

2
Annexure-II
PART B- Plan
Micro-Project Proposal

Title of Micro Project:


Design a Rotating Fan

0.1 Brief Introduction: -


Computer Graphics is the creation of pictures with the help of a computer.
The end product of the computer graphics is a picture it may be a business
graph, drawing, and engineering. This project is about the Design a Rotating
fan. We are implementing it using using different primitives available in C
Graphics library and combining them together in a required manner.

0.2 This Micro-Project aims at: -


1. To Design a Rotating Fan.
2. To implement built-in C graphics function in program.
3. Writing a C program for rotating fan.

0.3 Action Plan (Sequence and time required for major activities for 8weeks)
S.N Details of activity Planned Planned I. Code
. start Finish &Name of
date date Team
Members
1 Gather information 10 – 05 – 14 – 05–
about the microproject 2022 2022 Anand
and make important Umbarkar –
notes . 19CM064
2 Make the Microproject 21 – 05 - 26 – 05-
and report file . 2022 2022 Sarthak
Vinchurkar
-19CM066
3 Implement the program 18 – 05- 20 – 05 - Abhishek
and execute 2022 2022 Wankhade –

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

19CM067
4 Implement the program 18 – 05 - 20 – 05 - Gayatri Yaul –
and execute 2022 2022 19CM066
5 Analyzing the 15 – 05 - 17 – 05 - Vishakha Yawle
information . 2022 2022 -19CM069

0.4 Resources Required (major resources such as raw material, some


machining facility, software, etc)

Name of Specifications Qty Remarks


Resource/material
Computer / laptop Intel core i5.version 7 1
Google Chrome PC with a 1 gigahertz (GHz) 32-bit 1
(x86) or 64-bit (x64) processor.
Windows 10 32-bit with Service
Pack 1 (SP1) or higher

Turbo C++ 1
Turbo C++ 3.2

 Names of Team Members with Identity Code.


1 Anand Umbarkar – 19CM064

2 Sarthak Vinchurkar -19CM066


3 Abhishek Wankhade – 19CM067

4 Gayatri Yaul – 19CM066

5 Vishakha Yawle -19CM069

Micro-Project

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

Aim : Design a Rotating Fan

Introduction :

 Computer Graphics

Computers have become a powerful tool for the rapid and economical
production of pictures. There is virtually no area in which graphical
displays cannot be used to some advantage, and so it is not surprising to
find the use of computer graphics so widespread. Although early
applications in engineering and science had to rely on expensive and
cumbersome equipment, advances in computer technology have made
interactive computer graphics a practical tool. Today, we find computer
graphics used routinely in such diverse areas as science, engineering,
medicine, business, industry, government, art, entertainment, advertising,
education, and training.

Computer graphics are graphics created using computers and, more


generally, the representation and manipulation of image data by a
computer. The development of computer graphics has made computers
easier to interact with, and better for understanding and interpreting many
types of data. Developments in computer graphics have had a profound
impact on many types of media and have revolutionized animation,
movies and the video game industry. A major use of computer graphics is
in design processes, particularly for engineering and architectural
systems, but almost all products are now computer designed. Generally
referred to as CAD.

computer-aided design methods are now routinely used in the design of


buildings, automobiles, aircraft, watercraft, spacecraft, computers,
textiles, and many, many other products. Here we have used “ C Graphics
Library ”the graphics software system to implement our micro project,
“ Design a Rotating Fan”. Now let us have a quick look at our project.

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

Rotating fan review

In this micro project, we will try to implement the rotating fan which
will be rotating. There will be a supporting blades. The blades will be
attached to the tower and the blade will be rotating.

The Micro Project Design a Rotating Fan demonstrates the use of


various C Graphics functions and its applications to model the
requirements of an application programmer. It also illustrates the use of
mathematical functions to control the execution of the project that is
presented.

This project consists of Rotating Fan which is constructed by using


different primitives available in C Graphics library and combining them
together in a required manner. It illustrates the role of different callback
functions that provides easier way to accomplish our project in an
effective manner.

We have constructed the fan which is rotating. In this we have created


two blades and those blades were rotating this can be done with the help
of transformation technique rotation we rotate the blade by increasing
the angle and using for loop. We also draw a blades of fan which is
rotataing The fan has also a stand this is how our project is.

System Requirements

1. Hardware Requirements
Processor : Intel i3 onwards

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

RAM : At least 8GB of RAM

Hard disk : At least 100GB of hard disk free space

Monitor : VGA compatible(CRT or LCD-TFT)

2. Software Requirements
Operating system : windows

Language tool : C

Running Environment : Turbo C++

 Program :

#include <graphics.h>

#include <stdlib.h>

#include <stdio.h>

#include <conio.h>

#include <dos.h>

int main(void)

/* request auto detection */

int gdriver = DETECT, gmode, errorcode;

int i, midx, midy;

int stangle1 = -45, endangle1 = 0, radius = 100;

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

int stangle2 = 135, endangle2 = 180;

/* initialize graphics and local variables */

initgraph(&gdriver, &gmode, "C:/TURBOC3/BGI");

/* read result of initialization */

errorcode = graphresult();

if (errorcode != grOk)

/* an error occurred */

printf("Graphics error: %s\n", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1); /* terminate with an error code */

/* mid position of x in x-axis */

midx = getmaxx() / 2;

/* mid position of y in y-axis */

midy = getmaxy()/ 2;

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

/* start and end angle of fan's first wing */

if (endangle1 == 360)

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

stangle1 = -45;

endangle1 = 0;

/* start and end angle of fan's second wing */

if (endangle2 == 360)

stangle2 = -45;

endangle2 = 0;

/* clears graphic device */

cleardevice();

stangle1 = stangle1 + 45;

stangle2 = stangle2 + 45;

endangle1 = endangle1 + 45;

endangle2 = endangle2 + 45;

/* fan stand */

rectangle(midx - 5, midy - 5, midx + 5, midy + 150);

/* draws first wing of fan */

setfillstyle(SLASH_FILL, i % 15);

pieslice(midx, midy, stangle1, endangle1, radius);

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

/* draws second wing of fan */

setfillstyle(BKSLASH_FILL, i % 15);

pieslice(midx, midy, stangle2, endangle2, radius);

/* sleep for 40 millisecond */

delay(75);

/* clean up */

getch();

/* deallocate memory allocated for graphic screen */

closegraph();

return 0;

 Program Explanation :

So, this is the “C” Graphics Program in which we have created the
Rotating fan which is rotate and it has a two wings that are rotate and It
is bulid on one stand and rotaate. Here, we developed the program for

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

that and implement the idea into it. First of all we have included all the
header files that we requires for this program that are #include<stdio.h>,
#include <graphics.h>, #include <stdlib.h>, #include <conio.h> and
#include <dos.h> . Then there is a main function which is the first
function which is called when program start exectution. inside the main
function we have declare the graphics driver variable and detct the
appropriate graphics mode for it and store it in a gmode variable and also
decalre one variale errorcode. We decalre the variable stangle1 and
assign the value -45 to it likewise we declare the variale endangle1 = 0
and variable radius = 100 and Variable int stangle2 = 135 and
endangle2 = 180.

After declaration of this data members we next initializes the


computer into standard graphics mode using the function
initgraph(&gdriver, &gmode, "C:/TURBOC3/BGI") Here we have to
give the path of BGI file in my case it is in my “ C:/Turboc3/BGI ”.
After initialization We have Read result of initialization using
graphresult() function and store its value into the variable errorcode and
the using the if condition we have checked the value of errorcode and if
it is not equals to the grOK then we displayed the message of errorcode
and then exit from the code and if it is not true then it goes to the if
condition and continue the further execution of program.

Then we find the mid position of x in x-axis using the equation


midx = getmaxx() / 2; and respectively find the mid position of y in y-
axis using the equation midy = getmaxy()/ 2; This is used for the
defining the fan position at the middle of the output screen. Then we use
the for loop which is run for 400 times to draw and rotate the fan here
first we declare the value for the fan’s start and end angle of fan's first
wing. Using if condition if the value of endangle1 is equals to 360 then
declare the value stangle1 = -45; endangle1 = 0; like wise we have to
declare the value for the fan’s start and end angle of fan's Second wing.
Using if condition if the value of endangle2 is equals to 360 then declare
the value stangle2 = -45; endangle2 = 0; Then clear the device and add
the 45 to the angles of the fan. i.e stangle1 = stangle1 + 45 , stangle2 =
stangle2 + 45 , endangle1 = endangle1 + 45 , endangle2 = endangle2 +
45;

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

Then draw the fan stand using rectangle() function using the midx
and midy value that we find earilier. Hence draw the stand in the middle
of the screen. And then draws the first wing of fan using the
setfillstyle() and pieslice() usig the given angles. Likewise we draws the
second wing of fan using the setfillstyle() and pieslice() usig the given
angle then stop for the sometimes i.e for 40 milisecond using the delay()
function and again go for the second iteration of the for loop and the
process is repaeat for 400 times that looks like the fan is rotating and
after the 400th iteration the program controls goes outside the loop and
then deallocate memory allocated for graphic screen using the
closegraph(); function. And stop the program using the return 0; and we
got the output of rotating fan and following screenshots shows the
execution of the program.

 Sample Input & Output

1. Input :-

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

2. Output :-

Conclusion

This project shows the graphical representation of a rotating


fan. The objective of this program is to implement simple and
basic functions of “C” grphics library . Computer graphics plays a
major role in today's world where visualization takes theupper
hand as compared to textual interaction.The project is

Downloaded by Mr R K ([email protected])
lOMoARcPSD|48049738

implemented using graphics functions provided by C.The above


argument is equally justified in the fields o f computer simulation
which involve complex graphics being highlighted at its peak. It
is becoming moreand more popular and the constant dive to
improve particular system efficiency bystudying its simulated
model attracts more people towards it

Downloaded by Mr R K ([email protected])

You might also like