Assosa University
Computer Graphics
Course code: CoSc 3072
Credit hours: 3, ECTS: 5
Prerequisite: CoSc 1012 Computer Programming
Prepared by: kehussen12@[Link]
Course description
This course will introduce students to all aspects of computer graphics
including hardware, software and applications.
Students will gain experience using a graphics application programming
interface (OpenGL) by completing several programming projects.
Course objectives
By the end of this course, students will be able to:
Have a basic understanding of the core concepts of computer graphics.
Be capable of using OpenGL to create interactive computer graphics.
Understand a typical graphics pipeline.
Have made pictures with their computer.
Chapter one
Introduction to interactive computer
graphics
What is Computer Graphics?
Computer graphics is an art of drawing pictures on computer
screens with the help of programming.
It involves
• Creation
• Computation and
• Manipulation of data
What is Computer Graphics?
computer graphics is a rendering tool for the generation and
manipulation of images.
Types of Computer Graphics
Interactive
users have some controls over the image
the user can make any changes to the image produced
E.g. Ping-pong game, drawing on touch screen, animating
pictures or graphics in movies etc…
Non-interactive
user has no control over the image.
E.g. screen savers, map representation of data etc…
History of computer graphics
Ivan Sutherland (1950s- 1960s) - SKETCHPAD
simple graphics on early computers
pop-up menus
constraint-based drawing
hierarchical modeling
History of computer graphics
Vector graphics (1960s- 1970s)
Uses mathematical equation to represent lines and curves.
mathematically based computer image format
development of languages like SAGE and Sketchpad that allowed
users to interactively create and manipulate graphical objects.
History of computer graphics
Pixel graphics (1970s- 1980s)
The introduction of raster displays and bitmap graphics
revolutionized computer graphics.
In the mid-1970s, Xerox PARC developed the first computer
with a graphical desktop, known as the "Alto."
History of computer graphics
Pixar and 3D Graphics (1980s)
In 1986, Pixar released "Luxo Jr.," a short film that showcased
the potential of computer-generated 3D animation.
The film's success led to advancements in 3D rendering and
animation, paving the way for computer-generated imagery
(CGI) in films.
History of computer graphics
Video Games (1970s-1990s)
In the 1970s and 1980s, arcade games like "Pong," "Space
Invaders," and "Pac-Man" popularized pixel graphics and
pushed for faster and more advanced hardware.
History of computer graphics
Graphical User Interfaces (1980s-1990s)
The development of graphical user interfaces (GUIs) in the
1980s,
such as Apple's Macintosh and Microsoft Windows, made
computer graphics more accessible to the general public.
GUIs replaced command-line interfaces with visually intuitive
elements like icons, windows, and menus.
History of computer graphics
3D Graphics Acceleration (1990s)
3D graphics cards with specialized hardware accelerators
became available, greatly improving real-time 3D rendering
capabilities.
This allowed for more immersive and visually impressive video
games and applications.
History of computer graphics
Virtual Reality (1990s-2000s)
introduced VR headsets for gaming
VR research continued and experienced a resurgence in the
2010s with the advent of more advanced VR devices.
History of computer graphics
Modern Era (2000s-present)
High-definition displays, advanced rendering techniques, and
powerful GPUs have enabled incredibly realistic graphics in
video games, movies, and virtual reality experiences.
Additionally, fields like data visualization, scientific simulations,
and augmented reality have benefited significantly from
computer graphics advancements.
3D graphics techniques and terminology
The term three-dimensional, or 3D, means that an object being
described or displayed has three dimensions of measurement:
width,
height, and
depth.
Fig 1.1 2D and 3D image
3D graphics techniques and terminology
The process by which mathematical and image data is transformed
into a 3D dimensional image is called rendering.
When used as a verb, it is the process that your computer goes
through to create the three dimensional image.
Rendering is also used as a noun, simply to refer to the final image
produced.
3D graphics techniques and terminology
Transformations and Projections
The following Figure shows the initial output of the BLOCK example
program, which shows a line drawing of a cube on a table or platform.
The points themselves are called
vertices(or vertex in the singular)
3D wireframe cube
Components of a 3D graphic system
3D Modeling :
o A way to describe the 3D world or scene, which is composed of mathematical
representations of 3D objects called models.
3D Rendering :
o A mechanism responsible for producing a 2D image from 3D models.
3D Modeling
Simple 3D objects can be modeled using mathematical equations
operating in the 3-dimensional Cartesian coordinate system.
the equation x2 + y2 + z2 = r2
is a model of a perfect sphere
with radius r.
3D graphics techniques and terminology
Transformations and Projections
By moving the points around, and drawing lines between them we
can produce the illusion of a 3D world on a flat 2D screen.
The earliest flight simulators employed technology no more
sophisticated than this.
3D graphics techniques and terminology
Transformations and Projections
A projection matrix takes care of the mathematics necessary to turn
our 3D coordinates into two-dimensional screen coordinates, where
the final line drawing actually takes place.
Rasterization
The actual drawing, or filling in of the pixels between each
vertex to make the lines is called rasterization.
3D graphics techniques and terminology
key concepts and terms
Vertex: In 3D graphics, a vertex (plural: vertices) is a point in
space with three-dimensional coordinates (x, y, z).
Vertices are the building blocks of 3D models and are
connected to form edges and faces.
Points
3D graphics techniques and terminology
key concepts and terms
Edge: An edge is a line segment connecting two vertices and
define the shape of a 3D model and determine its overall
structure.
edge
( )
vertex
edge
3D graphics techniques and terminology
key concepts and terms
Face: A face is a flat polygon defined by three or more vertices.
Faces create the visible surfaces of a 3D model, and their
arrangement determines the shape of the object.
3D graphics techniques and terminology
key concepts and terms
Rendering: The process of generating a 2D image from a 3D
scene.
It involves calculating the color, shading, and lighting of objects
in the scene to create a realistic or stylized representation.
3D graphics techniques and terminology
key concepts and terms
Polygon: A polygon is a closed two-dimensional shape formed
by connecting multiple vertices with edges.
Triangles and quads (four-sided polygons) are the most
common types used in 3D modeling.
3D graphics techniques and terminology
key concepts and terms
Texture Mapping: Applying a 2D image (texture) to the surface of a 3D
model.
Texture mapping adds details, color, and texture to objects, enhancing
their visual realism.
models are often described not only by geometry, but by textures as
well.
To each point of an object, we can associate some property (surface
color is a common one), and this property is then used in rendering
the object.
3D graphics techniques and terminology
key concepts and terms
Shading: Determining the appearance of surfaces by calculating
how light interacts with them.
Shading techniques include flat shading (each face has a single
color), Gouraud shading (smoothly interpolated colors across
vertices), and Phong shading (smoothly interpolated normal for
more realistic lighting).
3D graphics techniques and terminology
Common Uses of Computer Graphics
Real-Time 3D
An OpenGL-based flight simulator, courtesy of [Link].
Common Uses of Computer Graphics
3D graphics used for computer-aided design (CAD) (image courtesy of Software Bisque).
Common Uses of Computer Graphics
3D graphics used for medical imaging applications
Common Uses of Computer Graphics
3D graphics used for medical imaging applications
Designing Effective Step-By-Step Assembly Instructions
Common Uses of Computer Graphics
Virtual Reality
Experiencing things through our computers that don't
really exist.
A believable, interactive 3D computer-created world
that you can explore so you feel you really are there,
both mentally and physically.
Types of Virtual Reality System
Windows on World(WoW)
Also called Desktop VR
Using a conventional computer monitor to display the
3D virtual world.
Immersive VR
Completely immerse the user's personal viewpoint
inside the virtual 3D world.
Completely immerse the user's personal viewpoint
inside the virtual 3D world.
Immersive VR (cont’d)
Often equipped with a Head Mounted Display (HMD)
Head-Mounted Display (HMD)
A Helmet or a face mask providing the visual and auditory
displays.
Cont’d
Telepresence
A variation of visualizing complete computer generated
worlds.
Links remote sensors in the real world with the senses
of a human operator. The remote sensors might be
located on a robot. Useful for performing operations in
dangerous environments.
Telepresence (Cont’d)
Types of Virtual Reality System (cont’d)
Mixed reality (Augmented reality)
The seamless merging of real space and virtual space.
Integrate the computer-generated virtual objects into
the physical world which become in a sense an equal
part of our natural environment..
Types of Virtual Reality System (cont’d)
Mixed reality (Augmented reality)
Application Area
Computer Aided Design (CAD)
Presentation Graphics
Computer Art
Entertainment (animation, games, …)
Education & Training
Visualization (scientific & business)
Image Processing
Weather Maps
Cartography
Simulation and modeling
Graphical User Interfaces
Computer Aided Design (CAD)
Used in design of buildings, automobiles, aircraft, watercraft,
spacecraft, computers, textiles & many other products
Objects are displayed in wire frame outline form
Software packages provide multi-window environment
Presentation Graphics
Used to produce illustrations for reports or generate slides for use with
projectors
Commonly used to summarize financial, statistical, mathematical, scientific,
economic data for research reports, managerial reports & customer
information bulletins
Examples : Bar charts, line graphs, pie charts, surface graphs, time chart
Computer art
Used in fine art & commercial art
Includes artist’s paintbrush programs, paint packages, CAD packages and
animation packages
These packages provides facilities for designing object shapes &
specifying object motions.
Examples : Cartoon drawing, paintings, product advertisements, logo
design
Examples
Entertainment (Movies and games)
Movie Industry
Used in motion pictures, music
videos, and television shows.
Used in making of cartoon animation films
Entertainment (Movies and games)
Graphics
Animation
Game Industry
Focus on interactivity
Cost effective solutions
Education and training
Computer generated models of physical, financial and economic systems are
used as educational aids.
Models of physical systems, physiological systems, population trends, or
equipment such as color-coded diagram help trainees understand the
operation of the system
Training
Flight simulators, computer aided instruction, etc.
Image processing
CG- Computer is used to create a picture
Image Processing – applies techniques to modify or interpret existing
pictures such as photographs and TV scans
Medical applications
Picture enhancements
Tomography(a technique for displaying a cross section through a
human body or other solid object using X-rays or ultrasound.)
Applications of image processing
Improving picture quality
Machine perception of visual information (Robotics)
Image processing
Graphical user interface
Major component – Window manager (multiple-window areas)
To make a particular window active, click in that window (using
an interactive pointing device)
Interfaces display – menus & icons
Graphical user interface