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

CGR Microproject

The document describes a C++ program that demonstrates a rotating windmill using OpenGL. The program takes input coordinates and rotates parts of the windmill over time to demonstrate rotation. The objective is to design a 2D or 3D windmill using computer graphics. Resources, conclusions, and references are also provided.

Uploaded by

Atharv Khadatare
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

CGR Microproject

The document describes a C++ program that demonstrates a rotating windmill using OpenGL. The program takes input coordinates and rotates parts of the windmill over time to demonstrate rotation. The objective is to design a 2D or 3D windmill using computer graphics. Resources, conclusions, and references are also provided.

Uploaded by

Atharv Khadatare
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

A

Micro project report On

“A ROTATING WINDMILL”
SUBMITTED TO M.S.B.T.E., Mumbai
For the Award of
DIPLOMA COMPUTER ENGINEERING BY

Roll no Name of Student Enrollment no


Atharv Maruti Khadatare 2212140111
Anand Digambar Ukirde
Laxman Nagnath Khandekar 2212140131
Shrijeet Sharad Kashid
UNDER THE GUIDANCE OF

DEPARTMENT OF COMPUTER ENGINEERING


NBA ACCREDIATED

SVP’s Swami Vivekanand Institute Of Technology (Polytechnic), Solapur


Solapur - 413255
2023-24
AFFILIATED TO

M.S.B.T.E.
Evolution sheet for Micro Project

Academic Year:- 2023-24 Name of Faculty:-


Course:- Computer Engineering Course code:- CO3I
Subject:- Computer Graphics Subject Code:- 22318
Semester:- 3rd Scheme:- I

Title of Project:-

Comments/Suggestions about team work/leadership/inter-personal communication (if any)

Marks out of 4
Marks out of 6 Total
for
for mars
Roll No Name of students performance
performance in out
in oral/
group activity of 10
Presentation

Atharv Maruti Khadatare 2212140111

Anand Digambar Ukirde 2212140236

Laxman Nagnath Khandekar 2212140131

Shrijeet Sharad Kashid 2212140234

Name and
Signature of
faculty
SVP’s SWAMI VIVEKANAND INSTITUTE OF TECHNOLOGY(POLY), SOLAPUR

CERTIFICATE

This is to certify that the Project report entitled


“Text Editor (Notepad)”
Submitted by
Roll no Name of Student Enrollment no
Atharv Maruti Khadatare 2212140111
Anand Digambar Ukirde
Laxman Nagnath Khandekar 2212140131
Shrijeet Sharad Kashid

is a bonafide work carried out by above students, under the guidance of . and it is
submitted towards the fulfillment of requirement of MSBTE, Mumbai for the award of Diploma in
Computer Engineering at SVP’s COE (Polytechnic), Solapur during the academic year 2022-2023.

Guide

HOD Principal

Place: Solapur

Date: / /
Acknowledgement

“A ROTATING WINDMILL” has been developed successfully with a great contribution of two students in a
period of two months. We like to appreciate their guidance, encouragement and willingness since without their
support the project would not have been a success. We would like to give our heartfelt gratitude to
Principal , Guide & HOD who is the supervisor of our
project for helping and encouraging us in many ways to make our project a success. We would never been able
to finish our work without great support and enthusiasm from friends and support from our family. We would
like to thank the department of Computer Engineering, for giving us permission to initiate this project and
successfully finish it.
Introduction:-
Computer graphics is a sub- field of computer science and is concerned with digitally
synthesizing and manipulating visual content. Although the term often refers to three
dimensional computer graphics, it also encompasses two-dimensional graphics and
image processing.

Computer graphics is often differentiated from the field of visualization, although the two
have many similarities
Computer graphics displays information in the form of graphics objects as windows, graphs,
diagrams, etc. Thus, computer graphics express data in pictorial form.

Today, computer graphics is used extensively in all different areas such as buisness,
engeneering, medical, entertainment, advertising, education, etc.
ABSRACT :-
In this mini-project we have demonstrated the winding mill by using OpenGL and the
model is designed with pure c++ code . OpenGL is a freely available compluter
graphics operating system. Here we use header files . OpenGL is an interactive
environment. When the program is executed the fan will be rotating at it's
normal position .This demo displays the rotation of the fan which is designed and
implemented using c++ program language APIs provided by OpenGL. It has been
developed to undergo user modifications. The user modifications can be
specification and movement with several other features. It is our first insight into
this vast world of interactive graphics.

OBJECTIVE:-
SD|31563219

To design a 2D/3D wind mill with the help of computer graphics using a c++ program and to
obtain the output.
In this micro-project we will demonstrate the windmill. The model will be designed with pure
c++ code. When the program is executed the fan would be rotating at its normal position.

PROGRAM:-

A c++ program of computer graphics on the topic 'Rotating Fan'.


Program :-
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<graphics.h>
#include<math.h>
#include<dos.h>
void wind(float x[7],float y[7]);
void main()
{
int gd=DETECT,gm;
float x[7],y[7],maxx,maxy,xw1,yw1,xw2,yw2;
float theta=30;
initgraph(&gd, &gm, "C:\\TC\\bgi");
maxx=getmaxx();
maxy=getmaxy();
x[0]=maxx/2;
y[0]=maxy/2;
x[1]=y[4]=x[2]=-90;

y[6]=y[5]=y[1]=60;
y[2]=35;
y[3]=-100;
x[4]=20;
x[3]=0;
x[5]=90;
x[6]=65;
theta=theta*22/7/180;
while(kbhit()==0)
{
wind(x,y);
xw1=cos(theta)*x[1]+sin(theta)*y[1];
yw1=-sin(theta)*x[1]+cos(theta)*y[1];
xw2=cos(theta)*x[2]+sin(theta)*y[2];
yw2=-sin(theta)*x[2]+cos(theta)*y[2];
x[1]=xw1;
y[1]=yw1;
x[2]=xw2;
y[2]=yw2;
xw1=cos(theta)*x[3]+sin(theta)*y[3];
yw1=-sin(theta)*x[3]+cos(theta)*y[3];
xw2=cos(theta)*x[4]+sin(theta)*y[4];
yw2=-sin(theta)*x[4]+cos(theta)*y[4];
x[3]=xw1;
y[3]=yw1;
x[4]=xw2;
y[4]=yw2;
xw1=cos(theta)*x[5]+sin(theta)*y[5];
yw1=-sin(theta)*x[5]+cos(theta)*y[5];
xw2=cos(theta)*x[6]+sin(theta)*y[6];
yw2=-sin(theta)*x[6]+cos(theta)*y[6];
x[5]=xw1;
y[5]=yw1;
x[6]=xw2;
y[6]=yw2;
delay(75);
cleardevice();
}
closegraph();
getch();

void wind(float x[7],float y[7])

{
cleardevice();
line(x[0],y[0],x[0]-50,y[0]+200);
line(x[0],y[0],x[0]+50,y[0]+200);
line(x[0]-60,y[0]+200,x[0]+60,y[0]+200);
line(x[0],y[0],x[0]+x[1],y[0]-y[1]);
line(x[0],y[0],x[0]+x[2],y[0]-y[2]);
line(x[0]+x[1],y[0]-y[1],x[0]+x[2],y[0]-y[2]);
line(x[0],y[0],x[0]+x[3],y[0]-y[3]);
line(x[0],y[0],x[0]+x[4],y[0]-y[4]);
line(x[0]+x[3],y[0]-y[3],x[0]+x[4],y[0]-y[4]);
line(x[0],y[0],x[0]+x[5],y[0]-y[5]);
line(x[0],y[0],x[0]+x[6],y[0]-y[6]);
line(x[0]+x[5],y[0]-y[5],x[0]+x[6],y[0]-y[6]);
}

OUTPUT:-
Resources Used
Sr. No. Specification Remark
1 Intel Core i3/ i5, RAM 4GB As per requirement
2 Operating System – Windows 10 As per requirement
3 Application – Microsoft Word 2016 As per requirement

Conclusion:-

We understood how to implement a c++ program to design a 2D windmill in


computer graphics.
Properly understood what precautions to take while implementing the program.
The project is well suited for designing 2D objects, as well as for carrying out basic
graphics functionalities like drawing a simple line, circle, rectangle, filling them.
The project enable to work with mid-level Opengl complexity. Opengl serves as an
important stepping stone for venturing into other fields of computer graphics design
and application.

References:-

YouTube:-
https://youtu.be/JD4b8AAC1TA
https://youtu.be/ffOl9eLuAGs
Reference Book:- Computer Graphics
by Mrs. HEMLATA S. OHAL and VIJAY T.
PATIL
https://www.vtuplus.com/cgv-mini
projects/rotating -fan-computer
graphics-project-in-opengl/

You might also like