Professional Documents
Culture Documents
Steam Engine Report
Steam Engine Report
“STEAM ENGINE”
Submitted in partial fulfillment of the requirement for the award of degree of
Bachelor of Engineering
In
Computer Science and Engineering
Submitted by
Mr. Ajay A V.
Assistant Professor
Dept. of CS & Engineering
CERTIFICATE
This is to certify that the mini project work entitled “STEAM ENGINE” is carried out
by YASHASWINI K.S bearing USN: 4NN17CS047 and VINUTHA R bearing USN:
4NN18CS411 in the partial fulfillment for the Sixth semester of Bachelor of Engineering
degree in Computer Science and Engineering of the Visvesvaraya Technological
University, Belagavi during the academic year 2018-19. The project report has been
approved as it satisfies the academic requirements with respect to project work prescribed for
the Bachelor of Engineering.
External Viva
1……………………....... 1……………………….
2………………………. 2………………………
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any task
would be in complete without the mention of the people who made it possible, whose
consistent guidance and encouragement crowned our efforts with success.
We express our sincere thanks to Smt. Vedavathi N, Assistant Professor and Head,
Department of Computer Science and Engineering, for her support and encouragement.
We would like to thank our guide, Mr. Ajay A V. Assistant Professor, Department of
Computer Science and Engineering, for his inspiration, guidance, constant supervision,
direction and discussions in the successful completion of this project work.
We are thankful to the Department of Computer Science and Engineering staff members
and non-staff members for their co-operation extended towards this work.
Finally, our heartfelt gratitude to our family members, relatives and friends for their
constant support, motivation and encouragement throughout this project. Above all we
would like to thank God Almighty, for having showered his blessings on us.
Yours sincerely
AIM: The aim of the project is to create a STEAM ENGINE.A steam engine uses heat
and steam to create mechanical power.
A steam engine is a heat engine that performs mechanical work using steam as its
working fluid. Heat is obtained from fuel burnt in a closed firebox .The heat is transferred to the
water in a pressurized boiler, ultimately boiling the water and transforming it into saturated steam.
Steam in its saturated state is always produced at the temperature of the boiling water, which in
turn depends on the steam pressure on the water surface within the boiler. The steam is transferred
to the motor unit which uses it to push on pistons to power machinery. The used, cooler, lower
pressure steam is exhausted to atmosphere.
The project simulates the working of a steam engine. It illustrates how the linear motion of
the piston is converted into rotary motion. The engine is initially at rest. On right clicking, the user
is provided with a menu which provides five options-shaded, animate, increase speed, decrease
speed, transparent.
The animate option starts the steam engine from rest or stops the engine if it is running. The
speed of the engine can then be increased by the increase speed option or decreased by the
decrease speed option. The texture of the engine can be changed by the shaded option. There are
two textures. One being the normal solid fill and the other being wireframe. The transparent
option makes the front portion of the cylinder transparent and shows the up and down motion of
the piston.
.
LIST OF CONTENTS
2. TABLES
Table 6.3 Testing for the ‘Steam Engine’ Project 16
STEAM-ENGINE 2019-20
CHAPTER 1
INTRODUCTION
First Come First Serve Algorithm is OS based Computer graphics Project. This Project as
name suggest demonstrate the working of First Come First Serve Algorithm or FCFS Algorithm.
The objects are drawn using the GLUT functions. This project has been developed using
Code::Blocks IDE on Windows 7 operating system with OpenGL package.
could not interpret the prodigious quantities of data produced in supercomputer runs without
summarizing the data and highlighting trends and phenomena in various kinds of graphical
representations.
● OpenGL (Open Graphics Library) is the interface between a graphic program and
graphics hardware. It is streamlined. In other words, it provides low-level
functionality. For example, all objects are built from points, lines and convex
polygons. Higher level objects like cubes are implemented as six four-sided polygons.
● OpenGL supports features like 3-dimensions, lighting, anti-aliasing, shadows,
textures, depth effects, etc.
● It is system-independent. It does not assume anything about hardware or operating
system and is only concerned with efficiently rendering mathematically described
scenes. As a result, it does not provide any windowing capabilities.
● It is a state machine. At any moment during the execution of a program there is a
current model transformation.
● It is a rendering pipeline. The rendering pipeline consists of the following steps:
○ Defines objects mathematically.
○ Arranges objects in space relative to a viewpoint.
○ Calculates the color of the objects.
○ Rasterizes the objects.
Graphics provides one of the most natural means of communicating with a computer,
since our highly developed 2D and 3D pattern-recognition abilities allow us to perceive and
process pictorial data rapidly and efficiently. Interactive computer graphics is the most
important means of producing pictures since the invention of photography and television. It
has the added advantage that, with the computer, we can make pictures not only of concrete
real world objects but also of abstract, synthetic objects, such as mathematical surfaces and
of data that have no inherent geometry, such as survey results.
OpenGL (open graphics library) is a standard specification defining a cross language
cross platform API for writing applications that produce 2D and 3D computer graphics.
OpenGL was developed by silicon graphics Inc. (SGI) in 1992 and is widely used in CAD,
virtual reality, scientific visualization, information visualization and flight simulation. It is
also used in video games.
Chapter 2
GL/glut.h:
We use a readily available library called the OpenGL Utility Toolkit (GLUT), which
provides the minimum functionality that should be expected in any modern windowing
system. The application program uses only GLUT functions and can be recompiled with
the GLUT library for other window system. OpenGL makes a heavy use of macros to
increase code readability and avoid the use of magic numbers. In most implementation,
one of the include lines.
CHAPTER 3
The aim of this project is to create a STEAM ENGINE. The Engine is made up of a
Piston, Engine Pole, Cylinder Head, Flywheel, Crank Bell and a Crank .The viewer is
allowed to rotate the Engine’s Crank either in clock wise or in anti-clock wise direction. The
viewer can also slow up or slow down the Crank speed.
3.1 Overview
First a Piston, Engine Pole, Cylinder Head, Flywheel, Crank Bell and a Crank is created
using myCylinder( ) function. The main primitives used inside the myCylinder( ) function to
create a Cylinder is gluCylinder( ) and gluDisk( ) . So every time, myCylinder( ) function is
called inside the functions used to create Piston, Engine Pole, Cylinder Head, Flywheel,
Crank Bell and Crank. The parts mentioned above are combined to form a Steam Engine
image. We can make Steam Engine transparent and display. In display function, at first it
clears the drawing buffer and if transparency is set, displays the model twice, first time
accepting those fragments with a ALPHA value of 1 only, then with DEPTH_BUFFER
writing disabled for those with other values. Initially when the animation is not called, the
crank angle will not change and the window is idle. When called increments the crank angle
by ANGLE_STEP, updates the head angle and notifies the system that the screen needs to be
updated. When a menu option has been selected, it translates the menu item identifier into a
keystroke, then calls the keyboard function. A menu will be associated with the mouse too.
The viewer can also see the shaded and textured steam engine.
‘o’ - >Transparency.
‘0’ and ‘1’ - > Right light and Left light respectively
The user can provide any input(through mouse) and see the changes in Engine on
those input.
The user can see the changes in engine on a predefined example by pressing the
right key in mouse.
3.3 Objective
The project simulates the working of a steam engine. It illustrates how the linear motion
of the piston is converted into rotary motion. The engine is initially at rest. On right clicking,
the user is provided with a menu which provides five options-shaded, animate, increase
speed, decrease speed, transparent.
3.4 Benefits
Simplicity: The project is built with the help of many standard library functions of
Flexibility: It is easy to add new features to the project since all the objects are
independent of their existence in the project. Hence the flexibility of the project is
beneficial.
Chapter 4
SYSTEM DESIGN
Future Contingencies
This section describes any contingencies that might arise in the design of the
system that may change the development direction.
void glutKeyboardFunc(myKey)
Refers to the keyboard callback function. The function to callback is defined as void
myKey(unsigned char key, int x, int y)
{
if (c == 't')
exit
if (c == 's')
//STATEMENTS and repeat when finished
}
Here keyboard interface is given to quit, the user can quit by pressing ‘q’ and to see
next example of the implementation, the user should press ‘n’.
Chapter 5
IMPLEMENTATION
mydisplay(void): this function on the value of the flag bit either calls front screen()
or disp().
strin():this function displays the text on the screen.
glPushMatrix(): pushes to the matrix stack corresponding to the current matrix
mode.
void glPopMatrix(): pops from the matrix stack corresponding to the current matrix
mode.
void gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble
top): defines a two-dimensional viewing rectangle in the plane z=0.
. void glRotatef(TYPE angle, TYPE dx, TYPE dy, TYPE dz): alters the current
matrix by a rotation of angle degrees about the axis(dx, dy, dz). TYPE here is
GLfloat.
void glTranslatef(TYPE x, TYPE y, TYPE z): alters the current matrix by a
displacement of (x, y, z). TYPE here is GLfloat. We need to translate to display the
new position of the line from the old position and also to go out to the beginning of
the next side while drawing.
void glLoadIdentity(): sets the current transformation matrix to an identity matrix.
● glClear( )-Takes a single argument that is the bitwise OR of several values indicating
which buffer is to be cleared.
● glClearColor ()-Specifies the red, green, blue, and alpha values used by glClear to
clear the color buffers.
Dept.of CSE , NIE-IT Mysuru Page 13
STEAM-ENGINE 2019-20
● glutPostRedisplay ( ) - which requests that the display callback be executed after the
current callback returns.
Chapter 6
TESTING
Test plan
Careful planning is needed to the most of testing and controlled testing cost.
6.3Results
Several errors were detected and rectified and the whole project is working as it
should have to work with proper output and high efficiency.
Steps to
Test case Test case execute the Expected Actual result Verdict
id test case result (Pass/Fail)
Chapter 7
SNAPSHOTS
Chapter 8
CONCLUSION AND FUTURE ENHANCEMENT
CONCLUSION
This project allows the user to rotate the piston in a Steam Engine. Its like a Miniature
Steam Engine Simulation.
FUTURE ENHANCEMENT
The future enhancement that can be made include:
1. SIMULATOR
Not only the movement of piston, we can make the whole parts in the steam engine
working so that it will be a simulator of steam engine. By modifying this project we can
construct a fully fledged simulator. Students who are studying about the steam engine can
work through this and it will be very helpful for them. Almost a complete picturization of a
steam engine can be done through this.
BIBLOGRAPHY
Books:
Edward Angel’s Interactive Computer Graphics Pearson Education 5th Edition.
Computer Graphics Using OpenGL – F.S. Hill, Jr. 2nd Edition, Pearson Education,
2001.
Computer Graphics – James D Foley, Andries Van Dam, Steven K Feiner, John F
Hughes, Addison-Wesley 1997.
Computer Graphics - OpenGL Version – Donald Hearn and Pauline Baker, 2nd
Edition, Pearson Education, 2003.