0% found this document useful (0 votes)
30 views20 pages

Lecture 10

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 20

COMPUTER

GRAPHICS
LECTURE №10
LECTURE’S OUTLINE
The aim of topic: Explore the classes of computer graphics, where
is computer graphics used and transform figures.

Agenda:
 Computer Graphics
 Two – Dimensional Graphics
 Three – Dimensional Graphics
 What is CG used for?
 Graphics Transformations
COMPUTER GRAPHICS
Computer graphics deals with generating images with the aid of computers. Today, computer graphics
is a core technology in digital photography, film, video games, cell phone and computer displays, and
many specialized applications. A great deal of specialized hardware and software has been developed,
with the displays of most devices being driven by computer graphics hardware. It is a vast and recently
developed area of computer science.
Computer graphics is responsible for displaying art and image data effectively and meaningfully to the
consumer. It is also used for processing image data received from the physical world, such as photo and
video content. Computer graphics development has had a significant impact on many types of media
and has revolutionized animation, movies, advertising, video games, in general.
COMPUTER GRAPHICS

There are two main classes of graphics used in the computer industry: two-dimensional (2D) and
three-dimensional (3D).
TWO – DIMENSIONAL GRAPHICS

2D computer graphics are the computer-based generation of digital images — mostly from models,
such as digital image, and by techniques specific to them.
2D computer graphics are mainly used in applications that were originally developed upon
traditional printing and drawing technologies such as typography.
2D graphics, in turn, are divided into vector and bitmap. Let's try to figure out what these types of
computer graphics are different from each other.
TWO – DIMENSIONAL GRAPHICS

Raster graphics
Let's start with the raster format. For the sake of justice, it should be noted that the basics of
computer graphics were laid by raster images. This method of forming a picture using a grid of
pixels, where each element has a set of parameters (brightness, color code, transparency level) has
significant advantages, as well as the continuation of these pluses, no less significant disadvantages.
Simplicity of the principles of grid formation turns into the inability to increase or decrease the
resulting picture. If it is significantly reduced, the details will be lost, if increased, monstrous
pixelization will appear.
TWO – DIMENSIONAL GRAPHICS

Interestingly, the main minus of the "raster" was his own the main advantage, the raster image
does not need to be calculated every time. It is enough to enter it once in a computer, and then it
will be stored there unchanged, which can not be said about the vector graph, which we will get
acquainted with in the second part of this article.
Raster graphics are used everywhere: in printing, on television, in computer games and cinema,
well, and, of course, on the Internet.
TWO – DIMENSIONAL GRAPHICS
Vector graphics
Creating computer graphics with vector algorithms processing gives the artist a huge opportunity. Images can be
scaled and rotated without limits, without any distortion or deterioration in the quality of the resulting work. But
such indicators are achieved at a fairly high cost. Each time the picture is changed, it is recalculated, so that with a
large number of different vector elements on the screen, a large amount of processing power may be required for
their simultaneous redrawing.
Because of its specifics, vector graphics are mainly used in the development of logos, in fonts, when drawing
cartoon characters for serials, in advertising, in designing, etc.
THREE – DIMENSIONAL GRAPHICS

Three-dimensional graphics
About such types of computer graphics as raster and vector, you can talk endlessly, but there is an
even more interesting type - three-dimensional graphics.
If in the previous, two-dimensional versions, any the image element is described by only two
coordinates, then in 3D three coordinates are needed to describe the position of each point. Thus, in
order to make a cube out of a square drawn on a piece of paper, only one additional one needs to be
added to its existing parameters.
THREE – DIMENSIONAL GRAPHICS

If you saw the famous movie "Avatar", then you it will be interesting to know that it was
completely created on a computer with the use of three-dimensional graphics. And almost all
appearing on the screens of PCs and consoles games are similarly created in the editors of three-
dimensional models. 3D graphics require huge computational power to calculate the parameters
of the displayed picture, so it does not stop even for a minute search for opportunities to optimize
and speed up the work with this format. But, unfortunately, the extensive method of development
still prevails over the intensive one. The power of graphics cards for processing graphics
increases, memory and processor frequencies are increasing.
WHAT IS COMPUTER GRAPHICS USED FOR?

Obvious uses of computer graphics include computer art, CGI films, architectural drawings, and
graphic design—but there are many non-obvious uses as well and not all of them are "artistic."
Scientific visualization is a way of producing graphic output from computer models so it's easier
for people to understand. Computerized models of global warming produce vast tables of numbers
as their output, which only a PhD in climate science could figure out; but if you produce a speeded-
up animated visualization—with the Earth getting bluer as it gets colder and redder as it gets hotter
—anyone can understand what's going on.
WHAT IS COMPUTER GRAPHICS USED FOR?

Medical imaging is another good example of how graphics make computer data more
meaningful. When doctors show you a brain or body scan, you're looking at a computer graphic
representation drawn using vast amounts of data produced from thousands or perhaps even
millions of measurements.
COMPUTER – AIDED DESIGN

Computer – aided design (CAD)—designing things on a computer screen instead of on paper —


might sound hi-tech and modern, but it's been in use now for over a half century. It first appeared
back in 1959, when IBM and General Motors developed Design Augmented by Computers-1 (DAC-
1), the first ever CAD system, for creating automobiles on a computer screen.
GRAPHICS PROCESSING UNIT

A graphics processing unit (GPU) is a specialized electronic circuit designed to rapidly


manipulate and alter memory to accelerate the creation of images in a frame buffer intended for
output to a display device. GPUs are used in embedded systems, mobile phones, personal
computers, workstations, and game consoles.
GRAPHICS TRANSFORMATIONS

Translating image is performed by adding translation matrix


GRAPHICS TRANSFORMATIONS

Scaling Image
Scaling can be used for zooming, or making some figure bigger or smaller.
Same to rotation, by default it scales correspondingly to origin (0, 0) point.
So to scale it according to some specific point, do same operation as for rotation
GRAPHICS TRANSFORMATIONS

Rotation Image
To rotate some set of points, multiply each point vector by rotate matrix r
rotated_point = r*p
In this case points of polygons rotates around (0, 0) point
GRAPHICS TRANSFORMATIONS

To rotate around some specific center, point should be subtracted by center point and then
multiplied by rotate matrix and center must be added again

r_point = rotate.dot(p-center)+center

Shearing images also is done by multiplying shear matrix to point


NUMPY LIBRARY
NumPy python library that operates with matrices

import numpy as np
a = np.array([3,2,1])
b = np.array([[0],[1],[4]])
c = np.array([6,1,9])
x = a.dot(b)
y = a+c
print(x.tolist())
print (y.tolist())
Thank you for your attention!

You might also like