Report 1
Report 1
INTRODUCTION
Graphics provides one of the natural means of communicating with a computer. Graphics
has also become a key technology for communicating ideas, data and trends in most areas of
commerce, science, engineering and education. Sographics refers to pictures, sketch of building,
flowcharts, control flow diagrams, bar charts, and pie charts.
Computer graphics is the creation, manipulation and storage of models and images of
picture objects by the aid of computers. This was started with the display of plotters and CRT.
Computer graphics is also defined as the study of techniques to improve the communication
between user and machine. Thus computer graphics is one of the effective media of
communication between machine and user.
Classification:
The term computer graphics has been used in a broad sense to describe almost everything on
computers that is not text or sound. Typically, the term computer graphics refers to several
different things:
The advance in computer graphics was to come from one MIT student, Ivan Sutherland. In
1961 Sutherland created another computer drawing program called Sketchpad. Using a light pen,
Sketchpad allowed one to draw simple shapes on the computer screen, save them and even recall
them later. The light pen itself had a small photoelectric cell in its tip. This cell emitted an
electronic pulse whenever it was placed in front of a computer screen and the screen’s electron
gun fired directly at it. By simply timing the electronic pulse with the current location of the
electronic gun, it was easy to pinpoint exactly where the pen was on the screen at any given
moment. Once that was determined, thecomputer could then draw a cursor at that location.
These early computer graphics were Vector graphics, composed of thin lines whereas modern
day graphics are Raster based using pixels. The difference between vector graphics and raster
graphics can be illustrated with a shipwrecked sailor. He creates an SOS sign in the sand by
arranging rocks in the shape of the letters”SOS”. He also has some brightly colored rope, with
which he makes a second “SOS” sign by arranging the rope in the shapes of the letters. The rock
SOS sign is similar to raster graphics. Every pixel has to be individually accounted for. The rope
SOS sign is equivalent to vector graphics. The computer simply sets the starting point and ending
point for the line and perhaps bends it a little between the two end points.
Charles Csuri
Charles Csuri is a pioneer in computer animation and digital fine art and created the first
computer art in 1964.Csuri was recognized by Smithsonian as the father of digital art and computer
animation, and as a pioneer of computer animation by the Museum of Modern Art (MoMA) and
(ACM-SIGGRAPH).
Donald P.Greenberg
Michael Noll
Noll was one of the first researchers to use a digital computer to create artistic patterns and
to formalize the use of random processes in the creation of visualarts. He began creating digital
computer art in 1962, making him one of the earliest digital computer artists. In 1965, Noll along
with FriederNake and Georg Nees were the first to publicly exhibit the computer art. During April
1965, the Howard Wise Gallery exhibited Noll’s computer art along with random-dot patterns by
BelaJulesz.
LITERATURE SURVEY
Computer graphics started with the display of data on hardcopy plotters and cathode ray
tube (CRT) screens soon after the introduction of computers.
Computer graphics today largely interactive, the user controls the contents, structure, and
appearance of objects and of displayed images by using input devices, such as keyboard, mouse,
or touch-sensitive panel on the screen. Graphics based user interfaces allow millions of new users
to control simple, low-cost application programs, such as spreadsheets, word processors, and
drawing programs.
In the 1980s, developing software that could function with a wide range of graphics
hardware was a real challenge. By the early 1990s, Silicon Graphics (SGI) was a leader in 3D
graphics for workstations. SGI's competitors (including Sun Microsystems, Hewlett-Packard and
IBM) were also able.
In addition, SGI had a large number of software customers; by changing to the OpenGL
API they planned to keep their customers locked onto SGI (and IBM) hardware for a few years
while market support for OpenGL matured to bring to market 3D hardware, supported by
extensions made to the PHIGS standard. In 1992, SGI led the creation of the OpenGL architectural
review board (OpenGL ARB), the group of companies that would maintain and expand the
OpenGL specification took for years to come.
Many OpenGL functions are used for rendering and transformation purposes.
Transformations functions like glRotate (), glTranslate (), glScaled () can be used.
OpenGL provides a powerful but primitive set of rendering command, and all higher-level
drawing must be done in terms of these commands. There are several libraries that allow you to
simplify your programming tasks, including the following:
OpenGL Utility Library (GLU) contains several routines that use lower-level OpenGL
commands to perform such tasks as setting up matrices for specific viewing orientations and
projections and rendering surfaces.
To achieve the objective of the project, information related to the light sources is required
with OpenGL we can manipulate the lighting and objects in a scene to create many different kinds
of effects. It explains how to control the lighting in a scene, discusses the OpenGL conceptual
model of lighting, and describes in detail how to set the numerous illumination parameters to
achieve certain effects. This concept is being obtained from.
PROBLEM DEFINITION
3D House Architect is a property designing program. Harneet's guide to 3D
House Architect comes in three designs for specific purposes: Home and Landscape
Design Suite, Home Design Deluxe, and Landscape Design Deluxe. Home Design
Deluxe simulates home designs, Landscape Design Deluxe simulates landscape
designs, and Home and Landscape Design Suite is used for both.
3D House Architect was introduced by Broderbund in the 1990s and was a scaled down version
of a professional home design application called Chief Architect, made by Advanced Relational
Technology (ART) Inc. (now renamed to Chief Architect, Inc.). After version 4.0, the agreement
between Broderbund and ART Inc. was terminated, and 3D Home Architect 5.0 and later versions
are based on a similar professional application called Cad soft Envisioned.
The narrative mode (also known as the mode of narration) is the set of methods the author of
a literary, theatrical, cinematic, or musical story uses to convey the plot to the audience.
Narration, the process of presenting the narrative, occurs because of the narrative mode. It
encompasses several overlapping areas of concern, most importantly narrative point-of-view,
which determines through whose perspective the story is viewed; narrative voice, which
determines the manner through which the story is communicated to the author to be the same
person.
However, the narrator may be a fictive person devised by the author as a stand-alone entity,
or even a character. The narrator is considered participant if an actual character in the story, and
nonparticipant if only an implied character, or a sort of omniscient or semi-omniscient being who
does not take part in the story but only relates it to the audience.
SYSTEM REQUIREMENTS
4.1 SOFTWARE REQUIREMENTS
• Processor : Pentium PC
• RAM : 128 MB
• Hard Disk : 20 GB(approx.)
• Monitor : VGA Color Monitor
5.1 FLOWCHART/ARCHECTURE
The figure shown below gives an abstract, high-level block diagram of how OpenGL processes
data. In the diagram, commands enter from the left and proceed through what can be thought of as
a processing pipeline. Some commands specify geometric objects to be drawn, and others control
how the objects are handled during the various processing stages.
per-fragment operations, which performs 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.
Figure relationships between an application program, the graphics system, input and output
devices, and the user.
The application program has its own internal model. It draws the graphics using the
facilities of the graphics system. The user views the graphics, and uses input devices, such as a
mouse, to interact. Information about the users is sent back tothe applications are sent back to the
application, which decides what action to take.Typically, it will make changes to its internal model,
which will cause the graphics to be updated, and so another loop in the interaction cycle begins.
A window on the display. The string title can be used to label the window.
The return value provides references to the window that can be used when there
are multiple windows. Register the mouse callback function f. The callback function
returns the button, the state of button after the event and the position of the
mouse relative to the top-left corner of the window.
Application program
OpenGL provides a powerful but primitive set of rendering command, and all the higher-
level drawing must be done in terms of these commands. There are several libraries that allow you
to simplify your programming tasks, including the following:
• OpenGL Utility Library (GLU) contains several routines that use lower-level OpenGL
commands to perform such tasks as setting up matrices for specific viewing orientations
and projections and rendering surfaces.
• OpenGL Utility Toolkit (GLUT) is a window-system-independent toolkit, written by Mark
Kilgard, to hide the complexities of differing window APIs.
Dept. of CSE, RRCE 2022-23 10
Include Files:
For all OpenGL applications, you want to include the gl.h header file in every file. Almost
all OpenGL applications use GLU, which also requires inclusion of the glu.h header file. So almost
every OpenGL source file begins with:
#include<GL/gl.h>; #include<GL/glu.h>
• glutInit(int *argc, char **argv) initializes GLUT and processes any command line
arguments (for X, this would be options like –display and -geometry). It should be
called before any other GLUT routine.
• glutInitDisplayMode(unsigned int mode) specifies whether to use an RGBA or color-
index color model. We can also specify whether we want a single or double buffered
window. We can use this routine to indicate the window to have associated depth, stencil
or accumulation buffer.
GLUT SINGLE: selects a single-buffered window which is the default if isn’t
called;GLUT DOUBLE: selects a double-buffered window.
• glutInitWindowPosition(intx,inty) specifies the screen location for the upper-left corner
of your window.
• glutInitWindowSize (intwidth,intsize) specifies the size, pixels, of window.
• glutCreateWindow (char *string) creates a window with an OpenGL context. It returns
a unique identifier for the new window.
glutDisplayFunc(void (*func)(void)) is the first and most important event callback function.
Whenever GLUT determines the contains of the window to be redisplayed.
glutDisplayFunc() registers the name of the callback function to be invoked when OpenGL
needs to redisplay the contents of the window. The application must register a display function –
it is not optional.
If your program changes the contents of the window, sometimes you will have to call
glutPostRedisplay(void), which gives glutMainLoop() a nudge to call the registered display
callback at its next opportunity.
Three values are passed to the callback function: key is the ASCII code of the key pressed; x and
y give the pixel position of the mouse at the time. Inside the keyboard() callback, we look at the
value of key. If it’s 27 we call the standard C function exit() to terminate the program cleanly.
glutMouseFunc() register an application callback function which GLUT will call when the
user presses a mouse button within the window. The following values are passed to the callback
function:
You can use these routines to register callback commands that are invoked when specified events
occur.
Translation
• void glTranslatef(GLfloatx,GLfloaty,GLfloatz);
glTranslatef () creates a matrix M which performs a translation by (x,y,z) and then post-
multiplies the current matrix by M.
Scaling
• void glScalef(GLfloatx,GLfloaty,GLfloatz);
glScalef() creates a matrix M which performs a scale by (x,y,z) and then post-multiplies
the current matrix by M.
Rotation
• void glRotatef(GLfloatangle,GLfloatx,GLfloaty,GLfloatz);
glRotate() creates a matrix M which performs a counter-clockwise rotation of angle in
degrees. The axis about which the rotation occurs in the vector from the origin (0, 0, 0) to
the point (x,y,z),and then post-multiplies the current matrix by M.
There are two functions which operate on the current matrix stack:
glPushMatrix()
glPopMatrix()
voidglPushMatrix(void); Pushes the current matrix stack down one level. The matrix on the top
of the stack is copied into the next-to-top position.
void glPopMatrix(void); Pops the current matrix stack, moving each matrix in the stack one
position towards the top of the stack.
After all the setup is completed, GLUT programs enter an event processing loop, glutMainLoop().
void glutMainLoop(void) enters the GLUT processing loop, never to return. Registered callback
functions will be called when the corresponding events instigate them.
SNAPSHOTS
We found designing and developing this 3D House as a very interesting and learning
experience. It helped us to learn about computer graphics, design of Graphical User Interfaces,
interface to the user, user interaction handling and screen management. The graphics editor
provides all and more than the features that have been detailed in the university syllabus.
[3]F.S.Hill, Computer Graphics Using OpenGL Jr. 2nd Edition, Pearson Education, 2001, ISBN 0-
. 131-49670-0
Websites
• http://www.opengl.org/
• www.opengl.org/documentation/