The Earth Mover
(Analysis Report) (Computer Graphics Project)
Submitted by, Heena Gupta (0925937) Ishan Bansal (0925913)
Problem Description:
In the real estate business, usually the construction companies want to see the movement and placing of the bulldozer which will help them in construction of the building before taking any decision. This is particularly helpful in the metro cities where the locations can be far away from the real estate office. So in prior the construction activity can be planned and shown to the customer by the builder or developer so that customer sitting at a remote place can be given an overall design and architecture of the activity to be done, saving both time and money. Presently, in all the real-estate businesses the developers and engineers are faced with a problem that if the clients want to plan the construction process without going to the construction site, there is no other way to persuade the client to plan in advance according to the sketches and eventually this makes this process difficult for the developers and the builders. The main drawback with this approach is that the client is not fully aware of the design and structure of the site which gives very poor representation of the site and does not give the realistic view of it. The project is particularly helpful in metro cities where there is no much space available to carry out construction process. So the project helps to analyze the entire set of activities at a construction process. In order to deduce a solution to all the problems stated above we need to understand the meaning of the Computer Simulation. Computer simulation is the discipline of designing a model of an actual or theoretical physical system, executing the model on a digital computer, and analyzing the execution output. Simulation embodies the principle of ``learning by doing'' --- to learn about the system we must first build a model of some sort and then operate the model. So, in order to unravel this problem, a computer graphics simulation application can be of great importance if developed to the builder and developers to carry out their business with more ease and comfortably. This will also help to get the minute details of the house they are going to buy. Therefore, in order to facilitate this, a bulldozer activity is simulated by using OpenGL to implement the
blueprint of the site architecture and which will ultimately lead to better design by determining in advance how the entire activity is to be planned. If the proper co-ordinates of the site are given, the architect can also use the simulation to cross-check the possibility of any additional activity to be carried out. Some of the basic functionality that is required from 3D room simulation to solve this problem in this domain could be: Move around the site with help of keyboard. The user can also view the different objects from different angles. User can view site from outside. Change the perspective view of the site. Analyze Earth Movers activity. Lastly, zoom-in and zoom-out facility. If the above functionality is added, the application area of the project can be expanded into diverse field.
OpenGL Geometric Primitives:
GL_LINES GL_POINTS GL_LINE_STRIP GL_LINE_LOOP GL_POLYGON
GL_TRIANGLES GL_QUADS GL_QUAD_STRIP GL_TRIANGLE_STRIP GL_TRIANGLE_FAN
OpenGL Basic Shapes related functions
Projections
The problem of representing a three-dimensional object or scene in a twodimensional medium. Projection can be defined as a mapping of point P(x, y, z) onto its image P (x, y, z) in the projection plane or view plane, that constitutes the display surface. The mapping is determined by a projection line called the projector that passes through P and intersects the view plane. The intersection point is P. The result of projecting an object is dependent on the spatial relationship among the projectors that project the points on the object, and the spatial relationship b/w the projectors and the view plane.
Observation: Projection preserves lines. That is., the line joining the projected images of the endpoints of the original line is the same as the projection of that line. Two basic methods of projection are: Perspective Parallel
Taxonomy of Projection
Perspective (converging projectors) One point (1 principal vanishing point) Two point (2 principal vanishing point) Three point (3 principal vanishing point) Parallel (parallel projectors) Orthographic (projectors perpendicular to view plane) Multiview (view plane parallel to principal planes) Axonometric (view plane not parallel to principal planes) Isometric Diametric Trimetric Oblique (projectors not perpendicular to view plane) General Cavalier Cabinet
Specifying a Color and a Shading Model
OpenGL maintains a current color (in RGBA mode) and a current color index (in colorindex mode). Unless you're using a more complicated coloring model such as lighting or texture mapping, each object is drawn using the current color (or color index). Look at the following pseudo code sequence: set_color (RED); draw_item (A); draw_item (B); set_color (GREEN); set_color (BLUE); draw_item(C); Items A and B are drawn in red, and item C is drawn in blue. The fourth line, which sets the current color to green, has no effect (except to waste a bit of time). With no lighting or texturing, when the current color is set, all items drawn afterward are drawn in that color until the current color is changed to something else. Specifying a Color in RGBA Mode In RGBA mode, use the glcolor*() command to select a current color. void glColor3{b s i f d ub us ui} (TYPEr, TYPEg, TYPEb); void glColor4{b s i f d ub us ui} (TYPEr, TYPEg, TYPEb, TYPEa); void glColor3{b s i f d ub us ui}v (const TYPE*v); void glColor4{b s i f d ub us ui}v (const TYPE*v);
The above command sets the current color as red, green, blue, and alpha values. This command can have up to three suffixes, which differentiate variations of the parameters accepted. The first suffix is either 3 or 4, to indicate whether you supply an alpha value in addition to the red, green, and blue values. If you don't supply an alpha value, it's automatically set to 1.0.
GLUT
GLUT (pronounced like the glut in gluttony) is the OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs. It implements a simple windowing application programming interface (API) for OpenGL. GLUT makes it considerably easier to learn about and explore OpenGL programming. GLUT provides a portable API so you can write a single OpenGL program that works across all PC and workstation OS platforms. GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits. GLUT is simple, easy, and small. The GLUT library has both C and C++ (same as C), FORTRAN, and Ada programming bindings. The GLUT source code distribution is portable to nearly all OpenGL implementations and platforms. The current version is 3.7. OpenGL is a software interface to graphics hardware. This interface consists of about 150 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.
Requirement specification:
Functional Requirements:
Our project Earth Mover will showcase various moves as follows. y y y y y y y Will collect the hard object with its blade and trash it. Different moves of the front and the back blade ( up and down motion). 360 degree view of the Earth Mover. Collision detection. Perspective view of the object. Construction site view. Fast / slow movement of the Earth Mover.
Hardware and software requirements
The application requires several hardware and software tools for successful execution. Hence several hardware and software requirements are mentioned below Hardware Requirements Any processor that supports multi-tasking with more than 333MHz. Any Microsoft developed operating system that supports multi-programming. RAM of 128MB or higher. Minimum hard disk capacity. Any colour monitor. Software Requirements Any Microsoft developed Operating System. Do cument at ion Packaging is MS WORD Open GL library for visual C++
System Model:
Earth Mover
User Input (Key press)
Fast / slow moment of the object
Blade (up and down)
Perspective view of the object 360 degree view of the object
Trashing the heavy load whenever necessary
Abstract Description:
Our project Earth mover aims to showcase various tasks performed by a machine. The main job of the Earth Mover is to transport heavy loads from one place to another or in construction sites to move heavy loads. In this project we would be able to present various movement of Earth Mover. Once the user press the desired key the machine performs various tasks like moment of the machine, lifting heavy materials with the help of blades. It also detects the collision and does not collide with other objects.