0% found this document useful (0 votes)
52 views18 pages

891 Docx1111

This document provides an overview of computer graphics and various applications including graphs and charts, computer-aided design, virtual reality environments, data visualization, education and training, entertainment, computer art, image processing, and graphical user interfaces. It then discusses OpenGL, an API for writing applications that produce 2D and 3D graphics, and its core GL library as well as the OpenGL Utility Library and Toolkit. The goal of this project is to create an animation of a moving ship using basic OpenGL functions like point plotting without built-in functions for translation, coloring, etc.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views18 pages

891 Docx1111

This document provides an overview of computer graphics and various applications including graphs and charts, computer-aided design, virtual reality environments, data visualization, education and training, entertainment, computer art, image processing, and graphical user interfaces. It then discusses OpenGL, an API for writing applications that produce 2D and 3D graphics, and its core GL library as well as the OpenGL Utility Library and Toolkit. The goal of this project is to create an animation of a moving ship using basic OpenGL functions like point plotting without built-in functions for translation, coloring, etc.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Moving Ship

CHAPTER 1

INTRODUCTION
Computer graphics are graphics created using computers and more generally, the
representation and manipulation of image data by a computer. The term computer graphics has
been used in a broad sense to describe "almost everything on computers that is not text or
sound".
The development of computer graphics has made computers easier to interact with,
better for understanding and interpreting many types of data. Developments in computer
graphics have had a profound impact on many types of media and have revolutionized
animation, movies and the video game industry.

The various applications of computer graphics are


 Graphs and charts
 Computer-Aided design
 Virtual-Reality environment
 Data Visualization
 Education and Training
 Computer Art
 Entertainment
 Image Processing
 Graphical User interfaces

Graphs and Charts:


An early application for computer graphics is the display of simple data graphs,
usually plotted on a character printer. Data plotting is still one of the most common graphics
applications, but today one can easily generate graphs showing highly complex data
relationships for printed reports or for presentations using 35 mm slides, transparencies, or
animated videos. Graphs and charts are commonly used to summarize financial, statistical,
mathematical, scientific, engineering, and economic data for research reports, managerial
summaries, consumer information bulletins, and other types of publications.

Computer Aided Design:

Dept. of CSE, SVIT 2022-2023 Page 1


Moving Ship

A major use of computer graphics is in design processes—particularly for engineering


and architectural systems, although most products are now computer designed. Generally
referred to asCAD, computer-aided design, or CADD, computer-aided drafting and design,
these methods are now routinely used in the design of buildings, automobiles, aircraft,
watercraft, spacecraft, computers, textiles, home appliances, and a multitude of other
products.The manufacturing process is also tied in to the computer description of designed
objects so that the fabrication of a product can be automated, using methods that are referred
to as CAM, computer-aided manufacturing.

Virtual Reality Environment:


It is a recent application of computer graphics which is used to create virtual-reality
environments in which a user can interact with the objects in a three-dimensional scene.
Specialized hardware devices provide three-dimensional viewing effects and allow the user to
“pick up” objects in a scene. Animations in virtual-reality environments are often used to train
heavy equipment operators or to analyze the effectiveness of various cabin configurations and
control placements. This allows the designer to explore various positions of the bucket or
backhoe that might obstruct the operator’s view, which can then be taken into account in the
overall tractor design.

Data Visualization:
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. The term business visualization is used in connection
with data sets related to commerce, industry, and other nonscientific areas. Numerical computer
simulations, for example, frequently produce data files containing thousands and even millions
of values. Similarly, satellite cameras and other recording sources are amassing large data files
faster than they can be interpreted. Other visualization techniques include contour plots,
renderings for constant-value surfaces or other spatial regions, and specially designed shapes
that are used to represent different data types.

Education and Training:


Computer-generated models of physical, financial, political, social, economic, and
other systems are often used as educational aids. Models of physical processes, physiological
functions, population trends, or equipment, such as the color-coded diagram in for some

Dept. of CSE, SVIT 2022-2023 Page 2


Moving Ship

training applications, special hardware systems are designed. Examples of such specialized
systems are the simulators for practice sessions or training of ship captains, aircraft pilots,
heavy-equipment operators, and air traffic-control personnel. Some simulators have no video
screens; a flight simulator with only a control panel for instrument flying. But most simulators
provide screens for visual displays of the external environment with multiple panels is mounted
in front of the simulator.

Entertainment:
Television productions, motion pictures, and music videos routinely use computer-graphics
methods. Sometimes graphics images are combined with live actors and scenes, and sometimes
the films are completely generated using computer-rendering and animation techniques. Many
TV series regularly employ computer-graphics methods to produce special effects, such as the
scene in Figure from the television series Deep Space Nine. Some television programs also use
animation techniques to combine computer-generated figures of people, animals, or cartoon
characters with the live actors in a scene or to transform an actor’s face into another shape. And
many programs employ computer graphics to generate buildings, terrain features, or other
backgrounds for a scene.

Computer Art:
Both fine art and commercial art make use of computer-graphics methods. Artists now
have available a variety of computer methods and tools, including specialized hardware,
commercial software packages (such as Lumena), symbolic mathematics programs (such as
Mathematica), CAD packages, desktop publishing software, and animation systems that
provide facilities for designing object shapes and specifying object motions. Example: use of a
paintbrush program that allows an artist to “paint” pictures on the screen of a video monitor.A
paintbrush system, with a Wacom cordless, pressure-sensitive stylus, was used to produce the
electronic painting. The stylus translates changing hand pressure into variable line widths,
brush sizes, and color gradations.

Image Processing:
The modification or interpretation of existing pictures, such as photographs and TV
scans, is called image processing. In computer graphics, a computer is used to create a picture.
Image-processing techniques, on the other hand, are used to improve picture quality, analyze
images, or recognize visual patterns for robotics applications.However, image-processing

Dept. of CSE, SVIT 2022-2023 Page 3


Moving Ship

methods are often used in computer graphics, and computer-graphics methods are frequently
applied in image processing. Typically, a photograph or other picture is digitized into an image
file before image-processing methods are employed. Then digital methods can be used to
rearrange picture parts, to enhance color separations, or to improve the quality of
shadingOpenGL (Open Graphics Library) is a standard specification defining a
crosslanguage,cross-platform API for writing applications that produce 2D and 3D computer
graphics. The interface consists of over 250 different function calls which can be used to draw
complex three-dimensional scenes from simple primitives. OpenGL was developed by Silicon
Graphics Inc. (SGI) in 1992 and is widely used in CAD, virtual reality, scientific visualization,
information visualization, and flight simulation [1].

OpenGL
OpenGL has become a widely accepted standard for developing graphics application.
Most of our applications will be designed to access OpenGL directly through functions in three
libraries. Functions in main GL library have names that begin with the letters gl and are stored
in a library usually referred to as GL.

The second is the OpenGL Utility Library (GLU). This library uses only GL functions
but contains code for creating common objects and simplifying viewing. All functions in GLU
can be created from the core GL library. The GLU library is available in all OpenGL
implementations; functions in the GLU library begin with the letters glu.

The third is called the OpenGL Utility Toolkit (GLUT), which provides the minimum
functionality that should be expected in any modern windowing system.

Fig 1.1: Library organization of OpenGL

Dept. of CSE, SVIT 2022-2023 Page 4


Moving Ship

1.1 Overview of the project

We are living in a world where good and attractive graphics are more important than
anything, like you have created a working program but if it is not attractive than there is high
probability that less people will use it. Current scenarios are that like if you are playing a game,
the quality of that game is judge on the basis that how good are the graphics of that game.

So, computer graphics are an important part of our day-to-day real life like while playing
games or animations which we see etc. So here what we will be doing is using the basics
function like plotting point we will try to make the whole animation of moving ship without
using any of the inbuilt function for translate or color filling or etc.

 Main features of this project:

● Transportation: One of the primaries aims of a moving ship project is to enable the
transportation of goods, resources, or people across bodies of water.

● Exploration and Research: Ships are instrumental in various scientific and research
endeavors, particularly in the fields of oceanography, marine biology, geology, and climate
research. Moving ship projects can aim to support these endeavors by providing platforms for
conducting research, collecting samples, and monitoring the marine environment.

● Defense and Security: Naval vessels form an essential part of a country's defense and
security infrastructure. Moving ship projects in this context focus on building and maintaining
warships, patrol vessels, and other maritime assets to safeguard territorial waters, support
military operations, and ensure national security.

● Environmental Protection: Some moving ship projects are centered around minimizing
the environmental impact of shipping operations. This includes developing eco-friendly
propulsion systems, reducing emissions, and implementing sustainable practices to preserve
marine ecosystems and mitigate climate change.

1.2 Aim of the project


The aim of a moving ship project can vary depending on the specific context and
objectives of the project. However, here are some common aims associated with such projects

Dept. of CSE, SVIT 2022-2023 Page 5


Moving Ship

Moving ship projects can aim to support these endeavors by providing platforms for conducting
research, collecting samples, and monitoring the marine environment. It's important to note that
the aims of a specific moving ship project can be a combination of these objectives or focus on
a particular area of interest.

Dept. of CSE, SVIT 2022-2023 Page 6


Moving Ship

CHAPTER 2

REQUIREMENT SPECIFICATION
A software requirement definition is an abstract description of the services which the system
should provide, and the constraints under which the system must operate. It should only specify
the external behavior of the system.

2.1 Functional requirements


In software engineering, a functional requirement defines a function of a software
system or its component. A function is described as a set of inputs, the behavior, and outputs
(see also software). Functional requirements may be calculations, technical details, data
manipulation and processing and other specific functionality that define what a system is
supposed to accomplish. Behavioral requirements describing all the cases where the system
uses the functional requirements are captured in use cases.

The various methods used in this project are as follows: - 


Display
The module draws the output on the screen and the functions in it.
 Menu
This module specifies the action corresponding to menu entry.  Keyboard
The module specifies the action corresponding to the key board.
 Keys Function y,m,a,e,n,d :- Changes the Shade
6,4, z :-for Boat Control

2.2 Non-functional requirements:


These are constraints on the services or functions offered by the system. They include
timing constraints, constraints on the development process and standards. Non-functional
requirements often apply to the system as a whole.

Non-Functional Requirements are as follows: -

Dept. of CSE, SVIT 2022-2023 Page 7


Moving Ship

2.2.1 Dependability:
The dependability of a computer system is a property of the system that equates to its
trustworthiness. Trustworthiness essentially means the degree of user confidence that the
system will operate as they expect and that the system will not ‘fail’ in normal use.

2.2.2 Availability:
The ability of the system to deliver services when requested. There is no error in the
program while executing the program.

2.2.3 Reliability:
The ability of the system to deliver services as specified. The program is compatible with all
types of operating system without any failure.

2.2.4 Safety:
The ability of the system to operate without catastrophic failure. This program is user friendly
and it will never affect the system.

2.2.5 Security:
The ability of the system to protect itself against accidental or deliberate intrusion.

2.3 Details of the software


Here, the coding of our project is done in Microsoft Visual C++ which is a commercial
integrated development environment (IDE) with OpenGL (Open Graphics Library) which is a
standard specification to produce 2D and 3D computer graphics. We use, the OpenGL Utility
Toolkit called GLUT which is a library of utilities for OpenGL programs.

2.3.1 Microsoft Visual C++


Microsoft Visual C++ is a commercial integrated development environment (IDE)
product engineered by Microsoft for the C, C++ and C++/CLIprogramming languages. It has
tools for developing and debugging C++ code, especially code written for the Microsoft
WindowsAPI, OpenGL API, the DirectXAPI and the Microsoft .NET Framework.

Dept. of CSE, SVIT 2022-2023 Page 8


Moving Ship

2.3.2 OpenGL and GLUT


OpenGL (Open Graphics Library) is a standard specification defining a cross-language,
crossplatformAPI for writing applications that produce 2D and 3D computer graphics,
describing a set of functions and the precise behaviors that they must perform. From this
specification, hardware vendors create implementations - libraries of functions created to
match the functions stated in the OpenGL specification, making use of hardware acceleration
where possible.
Hardware vendors have to meet specific tests to be able to qualify their implementation as an
OpenGL implementation.

GLUT 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.

2.4 Software requirements


 OPERATING SYSTEM : Windows 98, Windows XP,Windows Vista,
Windows 7
 FRONT END : Microsoft Visual Studio 2010
 CODING LANGUAGE : C++

2.5 Hardware requirements


 SYSTEM : Pentium IV 2.4 GHz or above
 HARD DISK : 40 GB, 80 GB, 160 GB or above
 MONITOR : 15 VGA colour
 RAM : 256 MB, 512 MB, 1 GB or above

Dept. of CSE, SVIT 2022-2023 Page 9


Moving Ship

CHAPTER 3

DESIGN
Data flow design is as shown below - covering the flow of the data in the system. It
describes the relation between user input and the system behavior.

Figure No.3.1 Flow chart Representation of Moving Ship

Dept. of CSE, SVIT 2022-2023 Page 10


Moving Ship

CHAPTER 4

IMPLEMENTATION
To implement the Current system, we have used different functions of our project which are as
follows:

4.1 USER DEFINED FUNCTIONS


 def move_up(ship, distance): ship['y'] += distance: used when ship is ready to departure
 def move_down(ship, distance): ship['y'] = distance: used when any issues occur
 def move_left(ship, distance): ship['x'] = distance: used to move towards left direction
 def move_right(ship, distance): ship['x'] + distance: used to move towards right direction
 def move forward (ship, distance): ship['z’] +=distance: used for forward direction def
move_position (ship, distance): ship['z'] --distance: used to change the position

4.2 BUILT IN FUNCTIONS


 voidglClear (GLbitfieldmask); mask- Bitwise OR of masks that indicate the
buffers to be cleared. The four masks are

GL_COLOR_BUFFER_BIT, GL_POSITION_BUFFER_BIT,

GL_DEPARTURE_BUFFER_BIT, GL_STOP_BUFFER_BIT.

It clears buffers to preset values.

 voidglClearKeys (GLstart, Gldeparture, GLposition, GLstop); Y, m, a, e, n, d, 6, 4,


z: specifies key functions used.
 setSpeed(speed): Sets the speed of the ship to the specified value. The speed could be
measured in knots or meters per second, depending on the system's units.
 setCourse(course): Sets the course or heading of the ship to the specified value. The
course is typically represented in degrees, ranging from 0° (North) to 360° (clockwise).
 turn(angle): Initiates a turn for the ship, where the angle parameter represents the
desired change in course. The ship will gradually change its heading by the specified
angle.
 adjustSpeed(acceleration): Adjusts the speed of the ship by applying the specified
acceleration value. This function allows for increasing or decreasing the ship's speed
over time.

Dept. of CSE, SVIT 2022-2023 Page 11


Moving Ship

 getPosition(): Retrieves the current position of the ship, usually represented by latitude
and longitude coordinates. The function may return a data structure or object containing
the ship's position information.
 calculateDistance(pointA, pointB): Computes the distance between two given points
on the Earth's surface. This function takes latitude and longitude coordinates as inputs
and returns the distance, often using formulas such as the Haversine formula.
 calculateETA(destination): Estimates the estimated time of arrival (ETA) at a
specified destination based on the ship's current speed and position. This function may
take into account factors like distance, speed, and possibly weather conditions.
 checkCollision(obstacles): Checks if there are any potential collisions with other ships,
obstacles, or land masses based on the ship's current position and course. The function
may receive a list of objects representing obstacles and return a boolean value indicating
whether a collision is imminent.

Dept. of CSE, SVIT 2022-2023 Page 12


Moving Ship

CHAPTER 5

TESTING
Testing has been conducted as tabulated below.

Dept. of CSE, SVIT 2022-2023 Page 13


Moving Ship

CHAPTER 6

SNAPSHOTS

Figure 6.1: Main Page


This screen shows the main page of the project.

Figure 6.2: Boat Position


This Screen shows the Objection and Boat position

Dept. of CSE, SVIT 2022-2023 Page 14


Moving Ship

Figure 6.3: Object Moving


This screen shoes the Boat and the Object Moving together at the point

Figure 6.4: Changing Shade


This screen shows the changing the shade of the boat.

Dept. of CSE, SVIT 2022-2023 Page 15


Moving Ship

Figure 6.5: Object and Boat at one point


This screen shows the object and Boat are at same position and Boat pointing the
object

Dept. of CSE, SVIT 2022-2023 Page 16


Moving Ship

CHAPTER 7

CONCLUSION
We are living in a world where good and attractive graphics are more important than anything,
like you have created a working program but if it is not attractive than there is high probability
that less people will use it. Current scenarios are that like if you are playing a game, the quality
of that game is judge on the basis that how good are the graphics of that game. So, computer
graphics are an important part of our day-to-day real life like while playing games or
animations which we see etc. So here what we will be doing is using the basics function like
plotting point we will try to make the whole animation of moving ship without using any of
the inbuilt function for translate or color filling.

Dept. of CSE, SVIT 2022-2023 Page 17


Moving Ship

BIBILOGRAPHY

Reference Books

[1] Donald Hearn & Pauline Baker: Computer Graphics with OpenGL Version,3rd /
4thEdition, Pearson Education,2011
[2] Edward Angel: Interactive Computer Graphics- A Top-Down approach with OpenGL,5th
edition. Pearson Education, 2008
[3] James D Foley, Andries Van Dam, Steven K Feiner, John F Huges Computer graphicswith
OpenGL: pearson education

Websites

www.opengl.org
www.google.co.in (OpenGLprojects)
www.wikipedia.com  www.github.com

Dept. of CSE, SVIT 2022-2023 Page 18

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy