Arbitrary clipping
#1

[attachment=9693]
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION TO COMPUTER GRAPHICS

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 (which define geometric objects) or pixels (which define images). OpenGL performs several processing steps on this data to convert it to pixels to form the final desired image in the frame buffer.
OpenGL presents a global view of how OpenGL works; it contains the following major sections:
• "OpenGL Fundamentals" briefly explains basic OpenGL concepts, such as what a graphic primitive is and how OpenGL implements a client-server execution model.
• "Basic OpenGL Operation" gives a high-level description of how OpenGL processes data and produces a corresponding image in the frame buffer.
OpenGL Fundamentals
Primitives and Commands: Primitives are specified, modes are set, and other OpenGL operations are described by issuing commands in the form of function calls. Primitives are defined by a group of one or more vertices.
Commands are always processed in the order in which they are received. It means that state-querying commands return data that's consistent with complete execution of all previously issued OpenGL commands.
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.
Input data can be in the form of pixels rather than vertices. The vertices are processed as pixels, in the pixel operations stage. The result of this stage is either stored as texture memory, for use in the rasterization stage.
GLUT: GLUT is a complete API written by Mark Kilgard which lets us 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.
1.2 Working of OpenGL
OpenGL bases on the state variables. It is logically structured. To be hardware independent, OpenGL provides its own data types. They all begin with "GL". For example GLfloat, Glint and so on. There are also many symbolic constants, they all begin with "GL_", like GL_POINTS, GL_POLYGON. Finally the commands have the prefix "gl" like glVertex3f(). There is a utility library called GLU, here the prefixes are "GLU_" and "glu". GLUT commands begin with "glut".
A very important thing is to know, that there are two important matrices, which affect the transformation from the 3d-world to the 2d-screen: The projection matrix and the modelview matrix. The projection matrix contains information, how a vertex – let's say a "point" in space – shall be mapped to the screen. This contains, whether the projection shall be isometric or from a perspective, how wide the field of view is and so on. Into the other matrix you put information, how the objects are moved, where the viewer is and so on.
Using Visual C++, firstly console application is to be created. The required include file is "GL\glut.h". It includes "GL\gl.h" and "GL\glu.h".
CHAPTER 2
REQUIREMENTS
2.1 PROBLEM STATEMENT

Our objective is to implement arbitrary clipping in C language. The user is provided the option to rotate the object. The user can also move the clipping plane and can increase the clipping area. The main intent of this program is to demo the arbitrary clipping functionality, hence the rendering is kept simple (wireframe) and only one clipping plane is used.
2.2 REQUIREMENT ANALYSIS
The algorithm computes the clipped polygon in three phases. At first, it determines (and marks) the intersection points. The points are then inserted in both lists, in their proper place by ordering them using the alpha values.
In order to efficiently implement this, the algorithm uses two doubly linked lists to represent the polygons. One list is for the clip and one for the subject polygon. In each list, a node represents a distinct vertex. Obviously, the lists will contain the x and y coordinates of the vertexes as well as the necessary links to the previous and next node in the list.
WHY C ?
C has several advantages over other languages; it is more portable than some and quicker than many. In its design the C language presents an irresistible combination of elegance and power. The C language is firmly established as the favorite programming language of serious developers. The freedom, unmatched portability and remarkable access of this language have made it the choice of computer professionals around the world.
The C programming language is designed to encourage economy of expression in a wide variety of applications. The C operators, data types and function library are unusually rich and portable, making its applications potentially widespread. C has spread in its popularity across several application areas. Portability and the extensive function library permit diverse applications to be realized.
When you write a program, you express your ideas in a format called a programming language. The C programming language has strict rules of grammar and meaning much like the natural languages people speak. A program written in C cannot be understood directly by the computer system. It must be translated before it can be run. The translator is called the compiler. The compiler for C is a complex program that converts source code into an intermediate form called an object module. An object module cannot be run any more than can the source do written in the C programming language.
The program must first be compiled or linked with support utilities provided by a part of the compiler known as the C library. Linking the object module produces the final program you can run. Linking, although an additional step, gives C much of its power because C relies heavily on support utilities, which the C library provides and which may be called from the source code of the C programs. These support utilities provide additional resources, to help you rapidly create executable programs.
C has a wide diversity of operators and commands that make it a very general purpose language. C is sometimes referred to as middle level languages. C’s low-level attributes allow once to specify logic detail, manipulate heap memory, effect bit and other low-level operations. Its advanced control structures, function usage, data types etc evidence C’s high-level characteristics. C is close enough to the hardware to allow extensive control over program implementation. In this way once can realize significant increases in computer efficiency. C is also clear, compact, pragmatic and concise. In its design the C language presents an irresistible combination of elegance and power.
2.3 SOFTWARE REQUIREMENTS
• The project has been carried out on Windows XP platform.
• The program for the arbitrary clipping has been written in ‘C’ and ’OpenGL’.
• The Arbitrary clipping used to key in the program is the ‘VISUAL STUDIO 6.0 C++’.
2.4 HARDWARE REQUIREMENTS
• Pentium or high processor
• 16 MB or more RAM
• Standard keyboard
• Microsoft compatible mouse
• VGA monitor
• Secondary storage medium
Reply
#2
please give the source code for arbitary clipping project
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: arbitrary synonymto mobile network security ppt s, ppt on capacity of data collection in arbitrary wsn, arbitrary meaning, clipping and clamping, efficient 2 d grayscale morphological transformations with arbitrary flat structuring elements documentation, argue that any network using proxy arp is vulnerable to spoofing i e an arbitrary machine can impersonate any other machine, define arbitrary,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Capacity of Data Collection in Arbitrary Wireless Sensor Networks Projects9 0 723 23-01-2012, 04:56 PM
Last Post: Projects9

Forum Jump: