CG Chapter 1 and 2
CG Chapter 1 and 2
Computer graphics is an art of drawing pictures, lines, charts, etc., using computer
with the help of program or software.
Generally , computer graphics is concerned with all aspects of producing pictures or
images, and it involves
Computer graphics provides methods to generate images using a computer for use in
any medium. It includes composition of one or more of the following:
1) Imaging: - It is the process of representing 2D images.
2) Modelling:-It is the process of creating and representing 3D objects. Mainly deals
with the shape of the object.
3) Rendering: - It is the process of constructing 2D images from 3D models. It focuses
on lighting and perspective of objects.
4) Animation: - It is the process of describing the change in objects in time. It
represent movement of the object.
Computer graphics 12/24/2023
Cont.…
Computer graphics has made computers easier to interact with, and interpret data.
Technically, the term computer graphics refers to:
The representation and manipulation of image data by a computer.
The technologies used to create and manipulate image.
The sub-field of computer science which studies methods for digitally synthesizing
and manipulating visual content.
Expensive hardware and the limited availability of software kept the field from
growing until the early 1980s,
In 2001, was the first fully computer-generated feature film were produced.
Scientific visualization
Entertainment
They are particularly widely used for visualising relationships and trends in scientific,
mathematical, financial and economic data.
Modern visualisation packages use 3-D effects such as shadowing to make the
graph/chart more visually appealing. Fig:1 shows Computer Graphics used for
drawing graphs and charts.
Scientists, engineers, medical personnel, business analysis, and others often need to
analyse large amounts of information or to study the behaviour of certain processes.
Augmented Reality was initially designed for medicine, military and maintenance
purposes.
Cellphone companies such as Nokia, Qualcomm, Google are willing to fund research
on AR.
Surgery
Computer-generated images (CGI) have been widely used in the entertainment industry
for producing special effects for films, and also for producing completely computer-
generated films.
In computer graphics, software refers to a program or collection
of programs that enable a person to manipulate images or models
visually on a computer.
CG programs: is the graphical programming languages to draw
geometrical shapes like circle, ellipse, rectangle, draw curves,
objects with various colors, 3d graphics programming, simple
animation programs, and algorithms programs.: C,C++,java,JS
Monitors
Keyboard
Cathode ray tubes (CRT)
Mouse
Raster scan display
Joystick
color CRT monitors
Plasma panel display Light Pen
Liquid crystal monitor Digitizer
Voice Recognition
Image Scanner
A computer screen is made up of
little dots, called PICture 00000000
ELements. (pixels).
01100110
If you make each dot on or off, 00000000
you can build up a monochrome 00011000
(black and white) picture. 00000000
Also, off and on can be 01000010
represented by binary 0 and 1. 00111100
00000000
Here is a diagram that shows a small
00000000
picture graphic represented by a 01100110
binary number. 00000000
Black and white allow ONE bit per 00011000
pixel. 00000000
Colour allows 8, 16 or even 24 bits 01000010
per pixel. 00111100
00000000
1-bit-deep⇒blackandwhiteonly.
8-bit-deep⇒28=256 colors.
Desktop
Vector
display
CRT
LCD
flat panel
Plasma
workstation displays(Sun Lab)
PC and Mac laptops
Tablet computers
Wacom’s display tablet
Digital Micro mirror Devices (projectors)
Field Emission Devices (FEDs)
Organic Light-Emitting Diode (OLED) Arrays
To
control light twisting, voltage applied to intersecting conductors to
align the molecules
Using thin-film transistor technology, place a transistor at
each pixel location
The Raster Scan is a scanning technique in graphics monitor where
the electron beam is moved along the screen covering one line at a
time from top to bottom.
Rasterization or scan conversion is the assignment of values to pixels
in the frame buffer that best represent graphical primitives: lines,
circles, polygons, etc.
Done by the processor.
In a raster scan, the electron beam is swept across the screen, ne row
at a time from top to bottom.
As the electron beam moves across each row, the beam intensity is
turned on and off to create a pattern of illuminated spots
Picture definition is stored in memory area called refresh buffer or
frame buffer
This memory area holds the set of intensity values for all screen
points
Stored intensity value are then retrieved from the refresh buffer and
painted on the screen one row (scan line) at a time.
Each screen points is referred as pixels as a pixel (picture elements)
at the end of each lien, the electron beam returns to the left side of
the screen to begin displaying the next scan line
Rendering
pipeline or Graphics pipeline, is a framework within computer
graphics that outlines the necessary procedures for transforming a three-
dimensional (3D) scene into a two-dimensional (2D) representation on a
screen.
There
are 4 common stages:
Vertex processing
Clipping
Rasterization
fragment processing
Modeling
Transformation
Lighting
This is a pipelined
sequence of operations
Viewing to draw a 3D primitive
Transformation
into a 2D image
Clipping
Scan
Conversion
Graphi2c2s
Example: OpenGL
Modeling
Transformation
glBegin(GL_POLYGON);
glVertex3f(0.0, 0.0, 0.0);
Viewing
Transformation glVertex3f(1.0, 0.0, 0.0);
glVertex3f(1.0, 1.0, 1.0);
Lighting & glVertex3f(0.0, 1.0, 1.0);
Texturing
glEnd();
Projection
Transformation
OpenGL executes steps
Clipping of 3D rendering pipeline
for each polygon
Scan
Conversion
Graphi2c3s
3D Rendering Pipeline
3D Geometric Primitives
Modeling
Transformation Transform into 3D world coordinate system
Viewing
Transformation
Lighting &
Texturing
Projection
Transformation
Clipping
Scan
Conversion
Graphi2c4s
3D Rendering Pipeline
3D Geometric Primitives
Modeling
Transformation Transform into 3D world coordinate system
Projection
Transformation
Clipping
Scan
Conversion
Graphi2c5s
3D Rendering Pipeline
3D Geometric Primitives
Modeling
Transformation Transform into 3D world coordinate system
Clipping
Scan
Conversion
Graphi2c6s
3D Rendering Pipeline
3D Geometric Primitives
Modeling
Transformation Transform into 3D world coordinate system
Clipping
Scan
Conversion
Graphi2c7s
3D Rendering Pipeline
3D Geometric Primitives
Modeling
Transformation Transform into 3D world coordinate system
Scan
Conversion
Graphi2c8s
3D Rendering Pipeline
3D Geometric Primitives
Modeling
Transformation Transform into 3D world coordinate system
Scan
Conversion Draw pixels (includes texturing, hidden surface, ...)
Graphi2c9s
Hidden Surface Removal
One of the most challenging problems in computer graphics is the
removal of hidden parts from images of solid objects.
In real life, the opaque material of these objects obstructs the light
rays from hidden parts and prevents us from seeing them.
In the computer generation, no such automatic elimination takes
place when objects are projected onto the screen coordinate system.
Instead, all parts of every object, including many parts that should
be invisible are displayed.
To remove these parts to create a more realistic image, we must
apply a hidden line or hidden surface algorithm to set of objects.
The algorithm operates on different kinds of scene models, generate
various forms of output or cater to images of different complexities.
The
implementation of these methods on a computer requires a
lot of processing time and processing power of the computer.
The image space method requires more computations. Each object
is defined clearly.Visibility of each object surface is also determined.
Algorithms used for hidden line surface detection
Z-Buffer Algorithm
Scan Line Algorithm
34 Computer Graphics
12/24/2023