0% found this document useful (0 votes)
116 views

Chapter One

This document provides an introduction to interactive computer graphics. It discusses the history of computer graphics from the earliest blinking lights to modern 3D graphics. Key developments included the introduction of monitors which allowed programmers to create graphics beyond just text, and the evolution of graphics from 2D to 3D. 3D graphics use techniques like transformations, projections, rasterization, shading, texture mapping, and blending to render scenes and give the illusion of depth. Common uses of 3D graphics include flight simulators, video games, movies, and scientific simulations.

Uploaded by

Abrham Mnyamr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views

Chapter One

This document provides an introduction to interactive computer graphics. It discusses the history of computer graphics from the earliest blinking lights to modern 3D graphics. Key developments included the introduction of monitors which allowed programmers to create graphics beyond just text, and the evolution of graphics from 2D to 3D. 3D graphics use techniques like transformations, projections, rasterization, shading, texture mapping, and blending to render scenes and give the illusion of depth. Common uses of 3D graphics include flight simulators, video games, movies, and scientific simulations.

Uploaded by

Abrham Mnyamr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

1

1 ) INTRODUCTION TO INTERACTIVE
COMPUTER GRAPHICS
Introduction to interactive Computer Graphics . . .
2

 Computer graphics is vast which encompasses


just about everything that is seen on computer
screen that isn’t a word or number on modern
operating system even they will appear on the screen
using techniques from graphics.
 Computer graphics may be defined as a pictorial
representation or graphical representation of objects
in a computer. It involves display, manipulation and
storage of pictures and experimental data for proper
visualization using a computer.
Introduction to interactive Computer Graphics . . .
3

 Computer graphics are pictures and movies


created using computers - usually referring to image
data created by a computer specifically with help
from specialized graphical hardware and software.
1.1 Brief history of computer Graphics
4

 The first computer consisted of rows and rows of


switches and lights.
 Technicians Engineers worked for hours, days, or
even weeks to program those machines and read
the results of their calculation.
The patterns of illuminated bulbs conveyed useful
information to the computer users, or some crude
print out provided.
We might say that the first forms of computer
graphics was panel of blinking lights.
1.1 Brief history of computer Graphics . . .
5

 This idea supported by early programmer writing


programs that served no useful propose other than
creating blinking chasing lights.
 The hobby of computer graphics was born the day
computers first started printing. Because each character
in the alphabet had a fixed size and shape , creative
programmers in the 1970s took delight in creating
artistic patterns and images made up of nothing more
than asterisks (*).
1.1 Brief history of computer Graphics . . .
6

Going to Electric
Papers are an output medium for computers is useful
and persist today.
Laser printers and color inkjet printers have replaced
crude ASCII art with crisp presentation quality and
photographic reproductions of artwork.
Paper and ink, however, can be expensive to replace on
a regular basis, and using them consistently is wasteful
of our natural resources, especially because most of the
time we don’t really need hard-copy output of
calculations or database queries.
1.1 Brief history of computer Graphics . . .
7

 The CRT was tremendously useful addition to


computer.
The original computer monitors, CRTs were initially
just video terminals that displayed ASCII text just like
the first paper terminals—but CRTs were perfectly
capable of drawing points and lines as well as
alphabetic characters.
Soon, other symbols and graphics began to supplement
the character terminal.
1.1 Brief history of computer Graphics . . .
8

 Programmers used computers and their monitors to


create graphics that supplemented textual or tabular
output. The first algorithms for creating lines and
curves were developed and published; computer
graphics became a science rather than a pastime.
 The first computer graphics displayed on these
terminals were two-dimensional(2D).
 These flat lines, circles, and polygons were used to
create graphics for a variety of purposes.
The term real-time was first applied to computer
graphics that were animated.
1.1 Brief history of computer Graphics . . .
9

 Broader use of the word in computer science simply


means that the computer can process input as fast as or
faster than the input is being supplied.
 For example, talking on the phone is a real-time activity
in which humans participate. You speak, and the listener
hears your communication immediately and responds,
allowing you to hear immediately and respond again,
and so on. In reality, there is some delay involved due to
the electronics, but the delay is usually imperceptible to
those having the conversation. In contrast , writing a
letter or an e-mail is not a real-time activity.
1.1 Brief history of computer Graphics . . .
10

 Applying the term real-time to computer graphics means


that the computer is producing an animation or a sequence
of images directly in response to some input, such as
joystick movement or keyboard strokes. Real-time computer
graphics can display a wave form being measured by
electronic equipment, numerical readouts, or interactive
games and visual simulations.
Going to 3D
 3D (Three dimensional): means that an object being
described or displayed has three dimensions of
measurement. width, height, and depth.
1. 1 Brief history of computer Graphics . . .
11

 In the 2D system, we use only two coordinates X and Y but


in 3D, an extra coordinate Z is added.
 For centuries, artists have known how to make a painting
appear to have real depth.
 A painting is inherently a two-dimensional object because it
is nothing more than canvas with paint applied.
 Actually, 3D computer graphics are actually two-
dimensional images on a flat computer screen that provide
an illusion of depth, or a third dimension.
 Look the image in the next slide ;What makes the cube look
three-dimensional is perspective, or the angles between the
lines that lend the illusion of depth.
1.1 Brief history of computer Graphics . . .
12
1.1 Brief history of computer Graphics . . .
13

 To truly see in 3D, you need to actually view an object


with both eyes or supply each eye with separate and
unique images of the object.
 Perspective alone is enough to create the appearance of
three dimensions.
1.2 3D Graphics Techniques and Terminology
14

 3D graphics terminologies are the terms used during


the rendering. There also processes or techniques
that are used during rendering. Rendering the
process by which mathematical and image data is
transformed into a 3D dimensional image. So let
us see them in detail.
1.2 3D Graphics Techniques and Terminology
15

 Transformation: - change in either position or


orientation or size or shape of graphics objects like
line, circle, arc, ellipse, rectangle, polygon etc. It
performed by using scaling, rotation, reflection
shearing & translation etc.
 Projection: - It is the process of converting 3D
object in to a 2D object. It also defined as mapping or
transformation of object in projection plane or view
plane.
 Rasterization: - The actual drawing, or filling in of
the pixels between each vertex to make the lines.
1.2.1 3D graphics terminologies
16

 Rasterization: The process of taking an image described in


vector graphics format(shapes) converting it into a raster
image.
 Shading is the procedure to color the surface of an object. It is
a technique to finding intensity profile of a surface as a whole
to simulate it’s appearance under a given lighting condition.
The current state of the art in real-time computer graphics is
programmable shading.
1.2.1 3D graphics terminologies . . .
17

 Texture mapping is the process of mapping 2D images on to 3D


polygon.
1.2.1 3D graphics terminologies . . .
18

Blending: Blending allows us to mix different colors


together. Reflection effect is done simply by drawing
the object upside down or vise versa.
1.2.1 3D graphics terminologies . . .
19

 Picture Elements (pixels): - the basic building


block of graphics display. Also known as Picture
Element. It is the smallest size objects or color spot
that can be displayed and addressed on the screen.
Any image displayed on the monitor made up of
thousands of pixels.
1.2.1 3D graphics terminologies . . .
20

 Connecting the Dots: Solid 3D geometry is nothing


but more than connecting the dots between vertices and
then rasterizing the triangles to make objects solid.
 Transformations, shading, texture, and blending: Any
computer rendered scene you see in a movie, video
game, or scientific simulation is made up of nothing
more than various applications of these four things.
1.2.2 3D graphics techniques

21

 Graphics packages allows user to specify which part of the


defined picture is to be display and where that part is to be
placed on the display devices. Any convenient Cartesian
coordinate system, referred to as the world coordinate
reference frame, can be used to define the picture.
 For a 2D picture, a view is selected by specifying the sub-
area of the total picture area. A user can select single area for
display or several areas could be selected for simultaneous
display or for an animated panning sequence across a scene.
The picture parts within the selected areas are mapped onto
the specified areas of the device coordinates.
1.2.2 3D graphics techniques
22

 When multiple view areas are selected, these areas


can be placed in separate display locations, or some
areas could be inserted into other, larger display
areas. Transformation from world to device
coordinates involve translation, rotation, and scaling
operations, as well as procedures for deleting those
parts of the picture that are outside the limits of the
selected display areas.
Common Uses for 3D Graphics
23

A) Real-Time 3D graphics are animated and


interactive with the user. One of the earliest uses for
real-time 3D graphics was in military flight
simulators. Even today, flight simulators are a
popular diversion for the home enthusiast.
 Show figure in the next slide the popular flight
simulator.
24
Common Uses for 3D Graphics. . .
25

The applications for 3D graphics on the personal computer


are almost limitless. Perhaps the most common use today
is for computer gaming. Although 3D has always been
popular for
 Games and entairtment
 Scientific visualization
 Medical Visualization
 Special Effects
 Computer aided design( CAD).
 Data visualization
 Image processing
Common Uses for 3D Graphics. . .
26

Education and Training:


 Computer-generated models of physical, financial and economic
systems are often used as educational aids.
 Models of physical systems, physiological systems, population trends
or equipment such as the color-coded diagram can help trainers to
understand the operation of the system.
 For some training applications, special 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, but most simulators provide
graphics screens for visual operation. For example, in an
automobile-driving simulator, it is used to investigate the behavior of
drivers in critical situations.
Common Uses for 3D Graphics. . .
27

 Cartography: Computer graphics is used to produce both


accurate and schematic representations of geographical and
other natural phenomena from measurement data.
 User interfaces: Most applications that run on PC and
workstations, and even those that run on terminals attached to
time shared computers and network computer servers, have
user interfaces that rely on desktop window systems to
manage multiple simultaneous activities, and on point and
click facilities to allow users to select menu items, icons, and
objects on the screen; typing is necessary only to input text to
be stored and manipulated. Word-processing, spreadsheet, and
desktop-publishing programs are typical applications that take
this text into the screen to display.
Common Uses for 3D Graphics. . .
28

 (Interactive) plotting in business, science and technology:


Create 2D and 3D graphs of mathematical, physical, and
economic functions; histograms, bar and pie charts; task-
scheduling charts; inventory and production charts, and the
like.
 Office automation and electronic publishing:
Many organizations whose publications used to be
printed by outside specialists can now produce printed
materials in house. Office automation and electronic
publishing can produce both traditional printed
(hardcopy) documents and electronic (softcopy)
documents that allow browsing of networks of
interlinked multimedia documents are proliferating
Common Uses for 3D Graphics. . .
29

 Computer-aided drafting and design: interactive


graphics is used to design components and systems of
mechanical, electrical, electromechanical, and electronic
devices, including structure such as buildings, automobile
bodies, airplane and ship hulls, very large scale-integrated
(VLSI) chips, optical systems, and telephone and
computer networks.
Common Uses for 3D Graphics. . .
30

 Simulation and animation for scientific


visualization and entertainment: Computer
produced animated movies and displays or the time-
varying behavior of real and simulated objects are
becoming increasingly popular for scientific and
engineering visualization. We can use them to study
abstract mathematical entries as well as
mathematical models of such phenomena as fluid
flow, relativity, nuclear and chemical reactions,
physiological system and organ function, and
deformation of mechanical structures under various
kinds of loads.
Common Uses for 3D Graphics. . .
31

B) Non Real time : The process of rendering and saving many


thousands of frames generates an animated sequence for playback.
Although the playback might appear real-time, the content is not
interactive, so it is not considered real-time, but rather pre-rendered.
 Shaders : The current state of the art in real-time computer
graphics is programmable shading.
- Today’s graphics cards are no longer dumb rendering chips, but
highly programmable rendering computers in their own right.
- Like the term CPU (central processing unit), the term GPU has
been coined, meaning graphics processing unit, referring to the
programmable chips on today’s graphics cards.
Common Uses for 3D Graphics. . .
32

- These are highly parallelized and very fast. Just as important, the
programmer can reconfigure how the card works to achieve virtually
any special effect imaginable.
 Basic 3D Programming Principles
- Not a Toolbox: OpenGL is basically a low-level rendering API. You
do not tell OpenGL to “Draw this model over there”—you have to put
together a model yourself by loading the triangles and applying the
necessary transformations as well as the proper textures, shaders ,
and if necessary blending modes. This gives you a great deal of low-
level control. The beauty of using a low-level API such as OpenGL
instead of a higher level toolkit is that you cannot only re implement
many standard 3D rendering algorithms, you can invent your own and
even make new discoveries for shortcuts, performance tricks, and
artistic visualization techniques.
Common Uses for 3D Graphics. . .
33

 Coordinate Systems: When you draw lines or plot


points on a simple flat computer screen, you specify a
position in terms of a row and column. In OpenGL, or
almost any 3D API, when you create a window to draw in,
you must also specify the coordinate system you want to use
and how to map the specified coordinates into physical
screen pixels. Let’s first see how this applies to two-
dimensional drawing and then extend the principle to three
dimensions.
I. 2D Cartesian Coordinates: The most common
coordinate system for two-dimensional plotting is
the Cartesian coordinate system.
Common Uses for 3D Graphics. . .
34

Cartesian coordinates are specified by an x coordinate


and a y coordinate. As you know the x coordinate is a
measure of position in the horizontal direction, and y is a
measure of position in the vertical direction. The x-axis
and y-axis are perpendicular (intersecting at a right angle)
and together define the xy plane. A plane is, most simply
put, a flat surface. In any coordinate system, two axes (or
two lines) that intersect at right angles define a plane. In a
system with only two axes, there is naturally only one
plane to draw on.
Common Uses for 3D Graphics. . .
35

 Coordinate Clipping : A window is measured physically in


terms of pixels. Before you can start plotting points, lines, and
shapes in a window, you must tell OpenGL how to translate
specified coordinate pairs into screen coordinates. You do this by
specifying the region of Cartesian space that occupies the
window; this region is known as the clipping region. In two-
dimensional space, the clipping region is the minimum and
maximum x and y values that are inside the window.
 Clipping: is a method to selectively enable or disable
rendering operations within a defined region of interest.
Common Uses for 3D Graphics. . .
36

 Viewports: Mapping Drawing Coordinates to Window


Coordinates:
- Viewport is the region within the window’s client area that is
used for drawing the clipping area; or an area on displaying
device to witch window is mapped.
- The viewport simply maps the clipping area to a region of the
window. Usually, the viewport is defined as the entire window,
but this is not strictly necessary; for instance, you might want to
draw only in the lower half of the window.
Common Uses for 3D Graphics. . .
37

 The Vertex—A Position in Space: In both 2D and


3D, when you draw an object, you actually compose it
with several smaller shapes called primitives.
Primitives are one- or two-dimensional entities or
surfaces such as points, lines, and triangles that are
assembled in 3D space to create 3D objects.
 3D Cartesian Coordinates : Now, we extend our two-
dimensional coordinate system into the third dimension
and add a depth component. Show the figure in the next
slide Cartesian coordinate system with a new axis, z.
The z-axis is perpendicular to both the x- and y-axes.
Common Uses for 3D Graphics. . .
38
Common Uses for 3D Graphics. . .
39

 Projections: Getting 3D to 2D : Projection is


displaying 3D object in 2D screen.
Common Uses for 3D Graphics. . .
40
Common Uses for 3D Graphics. . .
41

Classification of projection

Projection

Perspective projection
Parallel projection

Orthographic
Oblique
Simple Two Three
point Point Point
Common Uses for 3D Graphics. . .
42

 We are mostly concerned with two main types of projections in


OpenGL. The first is called an orthographic under parallel
projection. The second is perspective projection.
I. Orthographic Projections : We use this projection by
specifying a square or rectangular viewing volume .
Anything outside this volume is not drawn. This type of
projection is most often used in architectural design,
computer-aided design (CAD), or 2D graphs. Frequently,
you also use an orthographic projection to add text or 2D
overlays on top of your 3D graphic scenes. Orthographic
Projection projectors are orthogonal to projection surface.
II. Perspective projection: This projection adds the effect that
distant objects appear smaller than near by objects. In
Perspective projection Projectors converge at center of projection
Common Uses for 3D Graphics. . .
43

In Perspective projection Projectors converge at center of


projection.

This figure shows Orthogonal projection


Common Uses for 3D Graphics. . .
44

This figure Shows perspective projection


45

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