Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CGR Group No 4

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

Department of Computer Engineering

A PROJECT REPORT ON

COMPUTER GRAPHICS
DESIGN A ROTATING FAN

Micro project work submitted by:


1. GHULE SOPAN
2. NEHARKAR ARJUN
3. SHINDE SANKET

Under the guidance of

PROF.BORALE S.A
Academic year: 2020-21
ACKNOWLEDGEMENT

Whenever we are standing on most difficult step of the dream of our life. We often Remind the great god for

his blessing and kind help, & many people have contributed with Encouragement & technical advice. With all

respect and gratitude, we would like to thank all People who have helped us directly or indirectly for the

completion of this project work.

First & foremost, I grateful to Prof. MARKAD M.S Faculty Member of COMPUTER

Engineering Department, K.S.S.E.D.Polytechnic College of Engineering, For guiding us to Understand the work
conceptually and also for his constant encouragement to complete this Project work on
“DESIGN ROTATING FAN” We also Express our thanks to Prof. MARKAD M.S Head of COMPUTER
Engineeering Department for his Valuable recommendation & suggestions. With the deep sense of gratitude we
thank to our Principal, Prof. DR.ATTAR H.R, also Thankful to Management of institute for providing facilities.
Last but not least we thankful to all the teaching staff & Non teaching staff Members of COMPUTER
ENGINEERING Department.

We are ending this acknowledgement with deep indebtedness to our friends and Parents to support us to pursue
the technical Education
CERTIFICATE

This is to certify that Mis. --------------------------------------------------------------------


Of Third semester of Diploma in ‘Computer Engineering’ of institute’ K.S.S.E.D.
Polytechnic College Shevgaon’. has submitted the Micro-project satisfactorily in
subject “Computer Graphics” for academic year 2020 to 2021 as prescribed in the
curriculum.

Place: - Rakshi Enrollment No: ---------------

Date: ------------- Exam.Seat:-----------

Subject Teacher HOD Principal


INDEX
Sr.No Point Name

1. INTRODUCTION

2. ABOUT COMPUTER GRAPHICS

3. 2D TRANSFORMATION

4. PROGRAM

5. OUTPUT
REQUIREMENTS

 HARDWARE:
 Processor with minimum 50GB hard disk
 3 GB RAM

 SOFTWARE:
 Windows 7
 Turbo C.3.2.2

Introduction
C/C++ program to Rotating Fan Using Computer Graphics we are provide a C/C++ program tutorial with

example . Implement Rotating Fan Using Computer Graphics program in C/C++ .Download Rotating Fan

Using Computer Graphics desktop application project in C/C++ with source code  .Rotating Fan Using

Computer Graphics program for student, beginner and beginners and professionals.This program help

improve student basic fandament and logics.Learning a basic consept of C/C++ program with best example.

This C/C++ program submitted by Dharmesh Nakum.Rotating Fan Using Computer Graphics program with

output screen shot.Rotating Fan Using Computer Graphics academic C/C++ program for students. We have

grate program collection of C/C++ with source code.

About computer Graphics


Computer graphics are pictures and films created using computers. Usually, the term refers to computer-
generated image data created with the help of specialized graphical hardware and software. It is a vast and
recently developed area of computer science. The phrase was coined in 1960, by computer graphics
researchers Verne Hudson and William Fetter of Boeing. It is often abbreviated as CG, though sometimes
erroneously referred to as computer-generated imagery (CGI).

Some topics in computer graphics include user interface design, sprite graphics, rendering, geometry
processing, computer animation, vector graphics, 3D modeling, shaders, GPU design, implicit surface
visualization with ray tracing, image processing, computational photography, scientific visualization, and
computer vision, among others. The overall methodology depends heavily on the underlying sciences of
geometry, optics, physics, and perception.

2D Transformation | Rotation of objects


We have to rotate an object by a given angle about a given pivot point and print the new co-ordinates.
Examples: 
Input : {(100, 100), (150, 200), (200, 200),
(200, 150)} is to be rotated about
(0, 0) by 90 degrees
Output : (-100, 100), (-200, 150), (-200, 200), (-150, 200)

Input : {(100, 100), (100, 200), (200, 200)}


is to be rotated about (50, -50) by
-45 degrees
Output : (191.421, 20.7107), (262.132, 91.4214),
(332.843, 20.7107)

In order to rotate an object we need to rotate each vertex of the figure individually. 
On rotating a point P(x, y) by an angle A about the origin we get a point P'(x’, y’). The values of x’ and y’
can be calculated as follows:-
We know that, 
x = rcosB, y = rsinB
x’ = rcos(A+B) = r(cosAcosB – sinAsinB) = rcosBcosA – rsinBsinA = xcosA – ysinA 
y’ = rsin(A+B) = r(sinAcosB + cosAsinB) = rcosBsinA + rsinBcosA = xsinA + ycosA
Rotational Matrix Equation:-

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;
        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) {
                        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);

                /* 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;
 

OUTPUT
CONCLUSION
Rapid progress in computer technology and software has led to the situation where powerful packages
such as MSC Marc can be used on desktop systems. This made it possible to study the effect of damage on
the dynamics of a structure such as a blade prior to constructing an experimental test structure. From this
analysis it could clearly be seen that certain mode shapes were more susceptible to damage than others. These
findings correlated well with findings during a literature study. It was also found that the type of element used
was extremely important. Higher order elements gave superior accuracy although they were computationally
more expensive. First order solid elements are not a real proposition due to their poor performance in
bending.

REFERENCE
 Donald Knuth, The Art of Computer Programming
 ^ Bernard A. Galler and Michael J. Fischer. An improved equivalence algorithm. Communications of
the ACM, Volume 7, Issue 5 (May 1964), pages 301–303. The paper originating disjoint-set forests.

You might also like