Origami-Paper Folding Simulation
Origami-Paper Folding Simulation
CHAPTER 1
INTRODUCTION
As a software interface for graphics hardware, OpenGL's main purpose is to render two-
and three-dimensional objects into a frame buffer. These objects are described as sequences of
vertices or pixels. OpenGL performs several processing steps on this data to convert it to pixels to
form the final desired image in the frame buffer.
1.1WHAT IS OPENGL?
OpenGL is a software interface to graphics hardware. This interface consists of about150
distinct commands that you use to specify the objects and operations needed to produce interactive
three-dimensional applications.
OpenGL is designed as a streamlined, hardware-independent interface to be implemented
on many different hardware platforms. To achieve these qualities, no commands for performing
windowing tasks or obtaining user input are included in OpenGL; instead, you must work through
whatever windowing system controls the particular hardware we're using. Similarly, OpenGL
doesn't provide high-level commands for describing models of 3 dimensional objects. Such
commands might allow you to specify relatively complicated shapes such as automobiles, parts of
the body, airplanes, or molecules. With OpenGL, you must build up your desired model from a
small set of geometric primitives- points, lines, and polygons.
effect. It also means that state-querying commands return data that's consistent with complete
execution of all previously issued OpenGL commands.
1.2.1WHAT IS GLUT?
GLUT is a complete API written by Mark Kilgard which lets you create windows and
handle the messages. It exists for several platforms, that means that a program which uses GLUT
can be compiled on many platforms without (or at least with very few) changes in the code.
Display list
Frame B
Texture
Memory
Pixel
Operations
Rasterization produces a series of frame buffer addresses and associated values using a
two-dimensional description of a point, line segment, or polygon. Each fragment so produced is fed
into the last stage, Per-fragment operations, which perform the final operations on the data before
it's stored as pixels in the frame buffer. These operations include conditional updates to the frame
buffer based on incoming and previously stored z-value s (for z-buffering) and blending of
incoming pixel colors with stored colors, as well as masking and other logical operations on pixel
values. All elements of OpenGL state, including the contents of the texture memory and even of the
frame buffer, can be obtained by an OpenGL application.
design methods are now routinely used in the automobiles, aircraft, spacecraft, computers, home
appliances.
ÿ Circuits and networks for communications, water supply or other utilities are constructed with
repeated placement of a few geographical shapes. Animations are often used in CAD
applications.
ÿ When object designs are complete, realistic lighting conditions and surface rendering are applied
to produce displays that will show the appearance of the final product.
3) Virtual-Reality Environments:
ÿ A more recent application of computer graphics is in the creation of virtual-reality environments
in which a user can interact with the objects in a three dimensional scene.
ÿ Animations in virtual-reality environments are often used to train heavy-equipment operators or
to analyse the effectiveness of various cabin configurations and control placements.
ÿ With virtual-reality systems, designers and others can move about and interact with objects in
various ways. With a special glove, we can even “grasp” objects in a scene and turn them over or
move them from one place to another.
4) Data Visualizations:
ÿ Producing graphical representations for scientific, engineering and medical data sets and
processes is another fairly new application of computer graphics, which is generally referred to
as scientific visualization.And the term business visualizationis used in connection with data sets
related to commerce, industry and other non-scientific areas.
ÿ Visual techniques are also used to aid in the understanding and analysis of complex processes
and mathematical functions.
ÿ A color plot of mathematical curve functions.
5) Education and Training :
ÿ Computer generated models of physical,financial,political,social,economic& other systems are
often used as educational aids.
ÿ Models of physical processes physiological functions,equipment, such as the color coded
diagram as shown in the figure, can help trainees to understand the operation of a system.
6) Computer Art:
ÿ The picture is usually painted electronically on a graphics tablet using a stylus, which can
simulate different brush strokes, brush widths and colors.
ÿ Fine artists use a variety of other computer technologies to produce images. To create pictures
the artist uses a combination of 3D modelling packages, texture mapping, drawing programs and
CAD software etc.
ÿ Commercial art also uses theses “painting” techniques for generating logos & other designs,
page layouts combining text & graphics, TV advertising spots & other applications.
7) Entertainment:
ÿ Television production, motion pictures, and music videos routinely a computer graphics method.
ÿ Some television programs also use animation techniques to combine computer generated figures
of people, animals, or cartoon characters with the actor in a scene or to transform an actor’s face
into another shape.
ÿ Advanced computer-modelling & surface-rendering methods were employed in 2 award-winning
short films to produce the scenes.
8) Image Processing:
ÿ The modification or interpretation of existing pictures, such as photographs and TV scans is
called image processing.
ÿ Methods used in computer graphics and image processing overlap, the two areas are concerned
with fundamentally different operations.
ÿ In computer graphics, a computer is used to create a pictures. Image processing methods are
used to improve picture quality, analyse images, or recognize visual patterns for robotics
applications.
9) Graphical User Interfaces:
ÿ It is common now for applications software to provide graphical user interface (GUI) .
ÿ A major component of graphical interface is a window manager that allows a user to display
multiple, rectangular screen areas called display windows.
ÿ Each screen display area can contain a different process, showing graphical or non-graphical
information, and various methods can be used to activate a display window.
ÿ Using an interactive pointing device, such as mouse, we can active a display window on some
systems by positioning the screen cursor within the window display area and pressing the left
mouse button.
CHAPTER 2
REQUIRMENTS SPECIFICATION
The requirements can be broken down into 2 major categories namely hardware and
software requirements. The former specifies the minimal hardware facilities expected in a system in
which the project has to be run. The latter specifies the essential software needed to build and run
the project.
The hardware requirement is minimal and the software can run with minimal
requirements. The basic requirements are as enlisted below:
CHAPTER 3
SYSTEM DESIGN
This project is designed for supporting different transformation functions and event
driven function of OpenGL on primary objects. The aim of the project is to simulate a paper
aeroplane in open space using OpenGL functions.
3.1 DESCRIPTION:
This project is simple one where one just folds the paper and unfolds it. This project shows
the entire process of folding as well as unfolding. Each folding section has been curved with the
line. The single paper is divided into cross sections and each folding position is marked. Each states
has been enumerated. The lists of points make it possible to make the fold with recognizing what
state to follow. While rendering and movement is done easily but folding with good angle
specification is need. Motion of the Paper while it get fold (unfold) make more sense as it make
more visibility to user.
This project has been created using the OpenGL interface along with the GLUT( OpenGL
Library Toolkit), using the platform GCC as the compiling tool.
This project is a basic implementation to simulate a paper aeroplane in open space. This
is being simulated into a paper boat using keyboard keys and functions. It provides the user,
ability to rotate the paper aeroplane around at 360 angles in the open space by changing the
viewing angle and position using the keyboard keys.
The program provides user to set the different stages of the paper aeroplane simulation
and to check the origami simulation of the object at each level and can view the final simulation
by rotating it clockwise and anti-clockwise.
Requirement analysis encompasses all the tasks that go in to the instigation, scoping and
definition the new or altered system. Requirement analysis is an important part of design
process.
Start
Display
CHAPTER 4
IMPLEMENTATION
# include <stdlib.h>
The ISO C standard introduced this header file as a place to declare certain standard
library functions. These include the Memory management functions (malloc, free, et. al.)
communication with the environment (abort, exit) and others. Not yet all the standard functions of
this header file are supported. If a declaration is present in the supplied header file, then supports it
and will continue to support it. If a function is not there, it will be added in time.
# include <stdio.h>
Load the file SIMPLEIO.C for our first look at a file with standard I/O. Standard I/O
refers to the most usual places where data is either read from, the keyboard, or written to, the video
monitor. Since they are used so much, they are used as the default I/O devices and do not need to be
named in the Input/Output instructions. This will make more sense when we actually start to use
them so let’s look at the file in front of you.
The first things you will notice is the second line of the file, the #include "stdio.h" line.
This is very much like the #define we have already studied, except that instead of a simple
substitution, an entire file is read in at this point. The system will find the file named "stdio.h" and
read its entire contents in, replacing this statement. Obviously then, the file named "stdio.h" must
contain valid C source statements that can be compiled as part of a program. This particular file is
composed of several standard #defines to define some of the standard I/O operations. The file is
called a header file and you will find several different header files on the source disks that came
with your C compiler. Each of the header files has a specific purpose and any or all of them can be
included in any program.
generated ASCII character. The x and y callback parameters indicate the mouse location in
window relative coordinates when the key was pressed. When a new window is created, no
keyboard callback is initially registered, and ASCII key strokes in the window are ignored.
Passing NULL to glutKeyboardFunc disables the generation of keyboard callbacks.
ÿ void glFlush( );
Different GL implementations buffer commands in several different locations, including
network buffers and the graphics accelerator itself glFlush empties all of these buffers, causing
all issued commands to be executed as quickly as they are accepted by the actual rendering
engine. Though this execution may not be completed in any particular time period, it does
complete in finite time.
ÿ void glMatrixMode(GLenum mode);
In this function mode specifies which matrix stack is the target for subsequent matrix
operations. Three values are accepted: GL_MODELVIEW, GL_PROJECTION, and
GL_TEXTURE. The initial value is GL_MODELVIEW.
The glMatrixMode sets the current matrix mode can assume one of the values:
GL_PROJECTION: Applies subsequent matrix operations to the projection matrix stack.
ÿ glutCreateWindow() : this opens the OPENGL window and displays the title at top of the
window.
ÿ glutReshapeFunc() : sets up the call back function for reshaping the window.
ÿ Display():sets the background colour and clears the color buffer bit, and depth buffer bit ( for
hidden surface removal and Z buffer test), and it is called from the main().
5.1 ADVANTAGES:
ÿ Use of one’s fingers improves fine motor skills and brain development.
ÿ Develops imagination and a sense of color.
ÿ Improves concentration and spatial awareness.
ÿ Origami is well-suited to working with large classrooms and in a multi-age setting.
ÿ It is bridge to Math, transforming a flat piece of paper into a three-dimensional figure is a unique
exercise in spatial reasoning.
ÿ Through the actual folding, children use their hands to follow a specific set of steps in sequence,
producing a visible result that is at once clever and pleasing.
5.2 DISADVANTAGES:
ÿ Kami isn’t super high quality and usually only comes in 15x15 cm squares. If you are folding
anything super complex you will need bigger and higher quality paper.
ÿ It is very hard to use for origami because it is so thick and doesn’t hold creases very well.
ÿ Often you will need to treat the paper first to get crisp enough to fold.
CHAPTER 6
SNAPSHOTS
CHAPTER 7
CONCLUSION:
This project shows the various methods to implement paper folding mechanism using
Paper. The objective of this program is to implement simple and basic functions of OpenGL.
Computer graphics plays a major role in today’s world where visualization takes the upper hand as
compared to textual interaction. This is largely true as we can see user interface becoming more and
more attractive all thanks to major leaps in the fields of computer graphics. The project is
implemented using graphics OpenGL package provided by C++.
BIBLIOGRAPHY
Book references:
ÿ Donald Hearn & Pauline Baker: Computer Graphics with OpenGL Version, 3rd / 4th Edition,
Pearson Education, 2011.
ÿ Edward Angel: Interactive Computer Graphics- a Top Down approach with OpenGL, 5th
edition. Pearson Education, 2008.
Website references:
ÿ https://www.khronos.org/opengl/wiki/Getting_Started
ÿ https://www.opengl.org/sdk/docs/tutorials/OGLSamples/
ÿ https://www.geeksforgeeks.org/getting-started-with-opengl/
ÿ https://www.khronos.org/opengl/wiki//Code_Resources
ÿ http://www.lighthouse3d.com/tutorials/glut-tutorial/
ÿ http://code-blocks.blogspot.in/2014/12/html
ÿ https://github.com/sprintr/opengl-examples/blob/master/OpenGL-Menu.cpp