By:Md Saadullah: Shridhar S Paragond
By:Md Saadullah: Shridhar S Paragond
BY:MD SAADULLAH
And
SHRIDHAR S PARAGOND
1.1 General Introduction
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.
Using this editor you can draw and paint using the mouse. It can also perform a host of other functions like drawing lines, circles, polygons and so
on. Interactive picture construction techniques such as basic positioning methods, rubber-band methods are used. Block operations like cut, copy and paste
are supported to edit large areas of the workspace simultaneously. It is user friendly and intuitive to use.
Graphics Editors can normally be classified as:
• 2D Graphics Editors.
• 3D Graphics Editors.
A 2D Graphics Editor is used to draw 2D primitives (Line, Rectangle, Circle, Ellipse, etc. and alter those with operations like cut, copy and
paste. These may also support features like layers and object precision etc. A simple 2D Graphics Editor should include the following features:
• Facilities: Cursor Movement, Editing picture objects
• Good User Interface: GUI / Toolbars / Icon based User Interface.
A 3D Graphics Editor refers to program used to create 3D computer-generated imagery. There are typically many stages in the
"pipeline" that studios use to create 3D objects for film and games. Many 3D modelers are general-purpose and can be used to produce models
of various real-world entities, from plants to automobiles to people. Some are specially designed to model certain objects, such as chemical
compounds or internal organs.
3D modelers are used in a wide variety of industries. The movie industry uses them to create and manipulate characters and objects for
animated and real-life motion pictures. The video game industry uses them to create assets for video games. The science sector uses them to
create highly detailed models of chemical compounds. The architecture industry uses them to create models of proposed buildings and
landscapes. The engineering community uses them to design new devices, vehicles and structures as well as a host of other uses.
OpenGL is strictly defined as “a software interface to graphics hardware.” In essence, it is a 3D graphics and modeling library that is highly
portable and very fast. Using OpenGL,
you can create elegant and beautiful 3D graphics with exceptional visual quality. The greatest advantage to using OpenGL is that it is orders of
magnitude faster than a raytracer or software rendering engine. Initially, it used algorithms carefully developed and optimized by Silicon Graphics, Inc.
(SGI), an acknowledged world leader in computer graphics and animation. Over time, OpenGL has evolved as other vendors have contributed their
expertise and intellectual property to develop high-performance implementations of their own.
OpenGL is not a programming language like C or C++. It is more like the C runtime
library, which provides some prepackaged functionality.
OpenGL is intended for use with computer hardware that is designed and optimized for the display and manipulation of 3D graphics. Software-only
implementations of OpenGL are also possible. However, using a software implementation means that your program can potentially run on a wider
variety of computer
systems that may not have a 3D accelerated graphics card installed.
OpenGL is used for various purposes, from CAD engineering and architectural applications to modeling programs used to create computer-gene
1.3 Problem Statement
The objective is to build a graphics editor having all required operations that a normal graphics editor should offer. The coding is implemented for
a single canvas graphics editor. In this editor importance is given to a simple user interface and implementation of all basic graphic routines and basic
graphic editing options.
The basic requirements of the graphics editor were analysed to be:
1. User Interface- The presentation of the graphics editor is crucial to its acceptance by its users. The package should provide easy selection and
implementation of the features through iconic interfaces.
2. Color Selection - To select a suitable color for drawing the primitives. The editor implements support for drawing various shapes mentioned
above.
3. Graphics Drawing – To draw basic primitives like line, circle, rectangle on the canvas and to use tools like pencil, colour filling, eraser, etc. to
manipulate the image.
• Line: line is drawn by selecting two points start point and the end point. The start point begins with mouse click and end point is the point
where mouse button is released.
• Circle: Circle is drawn by selecting a point and dragging thereafter till the desired radius.
• Text: selecting the text icon and thereafter entering the text from keyboard
• Rectangle: rectangle is drawn by selecting a start point and dragging to end point of required size.
• Freehand Drawing: a freehand drawing is the one in which wherever mouse is dragged pixels are plotted
Other features:
• Fill Shapes: this is done by selecting a co-ordinate by click of mouse and the enclosed area of the point is filled with the selected color.
• Eraser: this feature allows deleting particular portions of figure as selected by click of the user.
• Dialog boxes: Dialog boxes and menus add user friendliness to the package.
*
Figure :OpenGL Block Diagram
*
H3.1 Introduction
3.1.1 Product Perspective:
This is a graphics editor that enables the user to input graphical data. Using the editor, the user can also save the information input by him/her into
files or open existing files for editing. This editor provides a graphical user-friendly interface to create and edit the files. In keeping with the low-end users,
help files have been provided for each of the actions.
This graphics editor is very user friendly tool. The user can very easily use this tool to draw or manipulate a drawing. The interface is mouse driven and
the user can select a function by clicking on an icon representing that function.
For the user’s help the function performed by each icon is displayed in the status bar as soon as the mouse pointer moves over the icon. We have
tried our best to make this editor very realistic, so that the user does not face any trouble when switching over from any real life graphics editor to this
highly useful one.
The following are some of the features that are planned to be supported in the future versions of the graphics editor.
• Features like "Undo" and "Redo " could be provided.
• The editor can be made to save images in standard image file formats such as bmp, jpeg, gif. Therefore Support for different file formats like bmp,
jpeg, gif etc. could be provided.
• Support for advanced 3d drawings and transformations.
• Only Single Document Interface (SDI) has been provided, multiple document interface can be provided.
SNAP SHOTS of project
We have obtained information from many resources to design and implement our
project successively. We have acquired most of the knowledge from related websites.
The following are some of the resources :
Textbooks:
1. Interactive computer graphics-Edward angel,2nd edition,Addison-welsey,2000
2. F.S.Hill,jr.:computer graphics using OpenGL,2nd edition,pearson education,2001
3. James.d.Foley,Andries Van Steven K Feiner,F.Hughes,computer graphics,Addisson-
wesley,1997 cc
1].Edward Angel: ”Interactive Computer Graphics A Top-Down Approach with OpenGL”, 5th Edition, Pearson Education ,Addison-
Wesley,2008.
[2].F.S. Hill, Jr.: “Computer Graphics Using OpenGL”, 2nd Edition, Pearson Education,2001.
[3]. James D Foley, Andries Van Dam, Steven K Feiner, John F Huges,