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

Introduction To Computer Graphics

Computer graphics involves the creation, storage, and manipulation of models and images across various fields. It has applications in entertainment, design, education, medical visualization, and marketing, utilizing different input and output devices. The rendering pipeline is a crucial process that transforms 3D scenes into 2D images through several steps, including vertex processing, rasterization, and image composition.

Uploaded by

shezanmahmud2003
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views20 pages

Introduction To Computer Graphics

Computer graphics involves the creation, storage, and manipulation of models and images across various fields. It has applications in entertainment, design, education, medical visualization, and marketing, utilizing different input and output devices. The rendering pipeline is a crucial process that transforms 3D scenes into 2D images through several steps, including vertex processing, rasterization, and image composition.

Uploaded by

shezanmahmud2003
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

INTRODUCTION TO

COMPUTER GRAPHICS
What is Computer Graphics?
• Computer graphics generally means creation, storage and manipulation of
models and images
• Such models come from diverse and expanding set of fields including physical,
biological, mathematical, artistic, and conceptual/abstract structures

Frame from animation by William Latham, shown at


SIGGRAPH 1992. Latham creates his artwork using
rules that govern patterns of natural forms.

2
What is Computer Graphics?
• William Fetter coined term “computer graphics” in 1960 to describe new
design methods he was pursuing at Boeing for cockpit ergonomics
• Created a series of widely reproduced images on “pen plotter” exploring
cockpit design, using 3D model of human body.

“Perhaps the best way to define computer graphics is to find out what it is not. It is not
a machine. It is not a computer, nor a group of computer programs. It is not the
know-how of a graphic designer, a programmer, a writer, a motion picture specialist, or
a reproduction specialist.
Computer graphics is all these – a consciously managed and documented technology
directed toward communicating information accurately and descriptively.”
Computer Graphics, by William A. Fetter, 1966

3
Differences

Computer vision: Extracting Computer graphics: Digital image processing:


information from the Creating an image from Processing raw input
contents of an input image scratch using computer. images to perform different
or video frame. Ex: Animated Movies operations.
Ex: Face Recognition, Ex: Apply Filter on an
Autonomous Driving Image, Noise Reduction,
Compression

4
Applications of CG
1. Entertainment & Gaming:
Visual Effects, Animation, Video Games, VR/AR Experiences.
2. Design & Engineering:
CAD Modeling, Architectural Visualization, Product prototyping.
3. Education & Training:
Virtual Labs, Interactive simulations, VR-based Learning.
4. Medical & Scientific Visualization:
MRI/CT Imaging, Surgery Simulation, Data and Astrophysical Visualization.
5. User Interfaces & Marketing:
GUIs, Graphic Design, 3D Product Visualization, Digital Ads.
5
Input Methods in Computer Graphics
• Keyboard and Mouse: Traditional devices for controlling software, navigation, and object
manipulation.
• Graphics Tablets: Used for digital drawing and illustration.
• Touchscreens: For direct interaction with graphical elements.
• 3D Scanners: Capture the 3D structure of objects to create digital models.
• Body as Interaction Device:

Xbox Kinect Leap Motion Nimble UX


6
Output Devices in Computer Graphics

• Monitors and Screens: The most common output devices, used to display images and videos.
• Printers: For generating hard copies of graphics (2D or 3D).
• Projectors: Used in large-scale displays for presentations and entertainment.
• VR/AR Headsets: Immersive displays for virtual and augmented reality applications.

7
Graphics Display Hardware
Vector Display (calligraphic, stroke, Raster Display (TV, bitmap, pixmap) used in
random-scan) displays and laser printers
• Driven by display commands • Driven by array of pixels (no semantics, lowest
• (move (x, y), char(“A”) , line(x, y)…) form of representation)
• Survives as “scalable vector graphics” • Note “jaggies” (aliasing errors) due to discrete
sampling of continuous primitives

Ideal Vector
Drawing Drawing Outline Filled
8
Output Technology: Vector Displays
• Also called Calligraphic, Stroke or Line Drawing
Graphics
• Lines drawn directly on phosphor
• Display processor directs electron beam
according to list of lines defined in a
"display list“
• Phosphors glow for only a few
microseconds so lines must be redrawn or
refreshed constantly
• Deflection speed limits # of lines that can
be drawn without flicker.

Fig.: Vector Display Architecture

9
Output Technology: Raster Displays
• Display primitives (lines, shaded
regions, characters) stored as pixels in
refresh buffer (or frame buffer)
• Electron beam scans a regular pattern
of horizontal raster lines connected by
horizontal retrace and vertical retrace
• Video controller coordinates the
repeated scanning
• Pixels are individual dots on a raster
line
Fig.: Raster Display Architecture

10
Basic Definitions

• Raster: A rectangular array of points or dots.


• Pixel (Pel): One dot or picture element of the raster
• Pixel Grid: Images are arranged in a grid of pixels,
where each pixel is stored with specific color
information (RGB values)
• Scan line: A row of pixels
Video raster devices display an
image by sequentially drawing out
the pixels of the scan lines that form
the raster.

11
Frame Buffer
• A frame buffer is characterized by its
size, x, y, and pixel depth.
• the resolution of a frame buffer is the
number of pixels in the display. e.g.
1024x1024 pixels.
• Bit Planes or Bit Depth is the number of
Bilevel or monochrome displays have 1
bits corresponding to each pixel. This bit/pixel (128Kbytes of RAM)
determines the color resolution of the 8bits/pixel -> 256 simultaneous colors
buffer. 24bits/pixel -> 16 million simultaneous
colors
• Dual ported (simultaneously writing
values and displaying in the monitor)

12
Raster vs. Vector Displays

•Raster: Pixel-based, fixed resolution, common in displays. Cheaper. More


realistic.
•Vector: Shape-based, resolution-independent, best for scalable designs.
•Use Cases: Raster is used for photographs and complex images, while
vector is used for fonts and logos.

13
Rendering Pipeline
The rendering pipeline is a sequence of steps used in computer graphics to convert a 3D scene into a
2D image on the screen.

Steps of the Rendering Pipeline:


1. Vertex Processing & Clipping
● Transforms object coordinates → world → camera → screen coordinates using model, view, and
projection transformations.
● Performs basic lighting calculations (per-vertex lighting in fixed pipelines).
● Clipping: Removes objects or parts of objects outside the camera can see ( view frustum)

2. Rasterization
● Converts 3D primitives (like triangles, lines) into 2D fragments (potential pixels).
● Determines which pixels are covered by each primitive and passes them to the next stage.
14
Rendering Pipeline
3. Fragment (Pixel) Processing
● Applies shading, textures, and lighting (per-pixel lighting in modern shader pipelines).
● Performs depth testing, transparency, reflection, and other pixel-level effects.

4. Image Composition / Output Merging


● Combines fragments from all objects into the final image.
● Applies depth buffering (Z-buffer), blending, and anti-aliasing.
● Outputs the result to the framebuffer for display on the screen.

15
Antialiasing
• Aliasing
• Approximating a continuous
entity with discrete samples
• Jagging / staircasing effect
• Result of an all-or-nothing
approach to scan conversion
• Each pixel is either colored
or left unchanged
• Antialiasing
• The application of techniques that reduce or eliminate aliasing

16
Antialiasing Techniques
• Increase Screen Resolution
• Costly
• Only diminishes,
does not solve
•Higher memory
• More time for
scan-conversion
(a) res. W x H (b) res. 2W X 2H
• Area Sampling
• Unweighted Area Sampling
• Weighted Area Sampling

17
Unweighted Area Sampling
Basic Idea:
• Horizontal or vertical line passes
through one pixel per row or column
• Lines at other angles go through
multiple pixels per row or column

• A line is considered as a
rectangle of a desired thickness
covering a portion of the grid

18
Unweighted Area Sampling
Basic Idea:
• Pixels on the grid overlapped by the rectangle are colored to an appropriate intensity.
General rule : A line contributes to each pixel’s intensity an amount proportional to the
percentage of the pixel’s tile it covers.

75%
25%
95%

19
Intensity of pixel centered at (x,y) :
Ix,y = I max . dA . Weight
dA = area overlap for pixel at (x,y)
Weight = 1 for unweighted area sampling

20

You might also like