Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

PROJECT TITLE: GAME DEVELOPMENT FOR ENTERTAINMENT USING

LINEAR ALEBRA

INTRODUCTION
The application of linear algebra has resulted in solving computer gaming
problems, development of new games and modification of games. We are now
able to develop objects and pictures with specific sizes we use in gaming as
well as applying linear matrices to put those objects and pictures into motion.
Without linear algebra we will not be able to do that. The use of linear algebra
is what brings interaction on a computer. Once the linear algebra format has
been applied on a computer , the computer is able to visualise the output.

LITERATURE REVIEW

2D VECTOR GRAPHICS
Vector graphics refers to presenting objects by mathematical descriptions of
geometrical objects, rather than by a calculation of pixels on the screen[raster
graphics]

VECTOR GRAPHICS VS RASTER GRAPHICS


Vector and raster graphics are two main forms of computer of two dimension
computer imagery. Raster graphics are represented as rectangular pixels,each
pixel being a varying level of colour. The collection of pixels is what brings a 2D
image like that of digital photographs.
Vector graphics uses mathematical expressions to represent image. It uses
point ,lines, and other geometrical primitives. At the center of each vector
image are control points which have defined positions on x and y and they
make up lines which makes a vector image.
Vector images are resolution independent because of their mathematical
nature, but raster images depend on resolution of images. Because vector
images are independent of resolution they occupy less storage space
compared to raster images , this is the impact of application of linear algebra
vectors. The increase of resolutions in raster increases the number of pixels
that need to be saved but vector images can be scaled without resolution.
VECTOR GRAPHICS IN LINEAR ALGEBRA

Computer graphics came way back when computers were introduced. They
have been helpful in game industry. Today’s video gaming make use of ultra-
realistic and highly complex 3D computer graphics to immerse the player into a
game’s world and setting. In the late 80s game developers could not develop
games the best way , so they invented new computer graphic technology. One
of those technology is vector based graphics.

PROBLEM STATEMENT.
Lack of engagement in creativity in an enjoyable way.

AIM
-developing a 3D video game to ensure active learning ,

, to improve the evaluation of the person taking part in it, without giving up or
losing motivation

,encourage students to learn while they overcome a challenge and have fun
,help people to acquire knowledge in a more entertaining way

OBJECTIVES
- entertainment and relaxation,
- mental stimulation
- socialisation
- creativity.
- time management
- productivity efficiency to adults who are working in companies.
-teach negotiation skills
-how to lead high performance skilled team.
METHODOLOGY

MATRIX OF VERTICES
in a game utilizing vectors, an object can be created using a set vertices or
points. The coordinates of vertices are stored in a data matrix such as in fig
below.

MATRIX MULTIPLICATION
This basic triangle shape can now, can now for example represent a game
spaceship.
However a game with a stationary spaceship does not entertain or fun,
therefore we need to move the spaceship around the screen. We can do this
by use of basic linear algebra principle which is matrix multiplication.

Matrix multiplication allows us to do transformation and translation of our


object. This is achieved by using raw column for AB.

Definition ; if the product AB is defined then the entry of raw I and column j is
the sum of products of corresponding entries of raw I of A and colum j of B.
However before we do any translation or transformation our object must use
homogeneous coordinates since it is not possible to do 2D translation on a 2D
point using matrix multiplication.
HOMOGENEOUS COORDINATES
Each point in (x,y) in R2 can be identified with point (x, y, 1) in R3, that lies 1
unit above the (x,y) plane. To make use of the homogeneous coordinates we
must convert our coordinatesin our spaceship matrix.
We accomplish it by adding a dummy coordinate to each vertex and setting its
value to one. The spaceship matrix with homogeneous coordinates must look
like the figure below

TRANSLATION
Now our matrix has homogeneous coordinates we can now make a translation
and allow it to move forward via matrix multiplication
We do this by multiplying the movement matrix with the ship matrix to get
the new ship location.
Movement matrix is a modified 3 by 3 matrix which represents the number of
units on (x,y) coordinates on which the spaceship will be moved by.
Below is a movement matrix

The result of the translation of the ship matix will be as below


For example to move the ship 2 units we need a translation of (0,2)

Ship after translation

ROTATION
We can now rotate the ship in its direction of movement by transformation via
matrix multiplication.
We multiply the rotation matrix and ship matrix.
A rotation matrix consists of a partioned matrix of the form shown below. It
may be clockwise or counterwise direction.
To rotate the spaceship 90 degrees we should perfom the following operation.

We the following diagram


RESULTS
Composite transformation functions.
Unfortunately our ship does not in the way most people expect so we use
composite functions to solve this problem, rotating the ship around the center
which has coordinates (1, 1.5)

A represents translation by (-1; -1.5)


B represent rotation clockwise by 90 degrees
Inverse of A represent the translation (1; 1.5)

The composite function makes the centre of the ship its origin then does the
specified rotation and comes to the centre.

Multiplying the ship by centre M will result in a desire rotation around the
centre.
t Thse of linear algebra is what
allows isnteractions to occur in a computer. Once
linear algebra has been
translated into a forma V

visuals to life

CONCLUSION
Vector graphics in linear algebra is a way of storing and manipulating
computer images. 2D vector graphics are rotation, moving and
scaling objects and images within retro games. The technique is
used in laying future advances in computer graphics especially

You might also like