Computer Graphics Unit 1
Computer Graphics Unit 1
Computer Graphics Unit 1
Topics
Computer graphics is the field of visual computing that deals with generating,
manipulating, and displaying visual content using computers. It encompasses
a wide range of techniques and technologies for creating images, animations,
and interactive experiences.
1. Application Stage:
- The graphics pipeline begins with the application stage, where higher-level operations
such as scene setup, object transformations, and camera positioning are performed.
TS 1
Computer Graphics 2 Unit 1
3. Rasterization Stage:
- Rasterization converts the geometric primitives (such as triangles or lines) generated in
the previous stage into fragments or pixels that correspond to points on the screen. Each
primitive is rasterized into a set of pixels, which are then processed further in subsequent
stages.
4. Vertex Shader:
- The vertex shader is a programmable stage in the graphics pipeline responsible for
manipulating individual vertices (points) of geometry. It can perform operations such as
lighting calculations, texture coordinate transformations, and vertex deformation.
5. Fragment Shader:
- The fragment shader, also known as the pixel shader, operates on each pixel generated
during rasterization. It calculates the final color of each pixel based on various factors such as
lighting, texture mapping, shading models, and material properties.
The graphics pipeline is highly parallelized and optimized for efficiency, allowing for real-time
rendering of complex 3D scenes and animations in applications such as video games,
computer-aided design (CAD), virtual reality (VR), and scientific visualization. Each stage in
the pipeline performs specific tasks to transform and manipulate the graphical data, ultimately
resulting in the generation of visually compelling images and animations.
For Example:
Ping-pong game.
Drawing on touch screens.
TS 2
Computer Graphics 3 Unit 1
TS 3
Computer Graphics 4 Unit 1
The terms "display processor" and "display controller" are related but not
exactly the same. They refer to different components involved in managing
the display of visual information on a screen or monitor. Here's a brief
explanation of each:
1. Display Processor:
TS 4
Computer Graphics 5 Unit 1
2. Display Controller:
- A display controller is a hardware or software component responsible for
managing the interface between a display device (such as a monitor or screen)
and the rest of the computing system. It controls the timing and signal
generation required to send video data from the graphics processor to the
display device. The display controller is responsible for tasks such as
refreshing the screen, adjusting resolution and refresh rate, handling multiple
displays, and implementing features like scaling, rotation, and color
management. In simpler terms, the display controller acts as an intermediary
between the graphics processor and the display device, ensuring that visual
information is properly formatted and transmitted for display.
In summary, while both the display processor and display controller play
essential roles in managing the display of visual content, they serve different
functions. The display processor focuses on generating and processing
graphics data, while the display controller manages the interface between the
graphics processor and the display device, ensuring proper communication
and display output.
Frame Buffer
TS 5
Computer Graphics 6 Unit 1
Video Memory
1. Storage: Video memory stores the graphical data needed to create images
and videos on your screen. This includes information about colors, shapes,
textures, and other visual elements.
3. Performance: The amount and speed of video memory can affect the
performance and quality of graphics on your screen. More video memory
allows for higher-resolution displays, more detailed textures, and smoother
animations. Faster video memory speeds up the process of rendering
graphics, leading to better overall performance in games, video playback, and
other graphics-intensive applications.
Video memory and frame buffer are related concepts, both involved in
the process of displaying images and graphics on a screen, but they
serve slightly different purposes:
TS 6
Computer Graphics 7 Unit 1
2. Frame Buffer:
- The frame buffer, sometimes referred to as the frame buffer, is a portion of
video memory used to temporarily store the rendered image or frame that is
currently being displayed on the screen.
- When the GPU finishes rendering an image, it stores the resulting pixel
data in the frame buffer. This allows the display device to quickly access the
image data and refresh the screen at the appropriate refresh rate.
- The frame buffer acts as a "waiting area" for completed frames before they
are displayed on the screen. It holds the most recently rendered image until
the display device is ready to refresh the screen with the next frame.
- The size of the frame buffer determines the maximum resolution and color
depth supported by the display device, as well as the number of frames that
can be stored in memory at once.
In summary, video memory (VRAM) is the dedicated memory space used for
storing graphical data, while the frame buffer is a portion of video memory
used to temporarily hold the rendered image or frame that is currently being
displayed on the screen. Both are essential components in the process of
rendering and displaying images and graphics on a computer or device's
screen.
TS 7
Computer Graphics 8 Unit 1
2. Presentation Graphics:
- Utilized to create illustrations summarizing various types of data.
- 3D graphics are particularly useful for visualizing complex data.
- Enables the creation of visually appealing presentations for reports or
conferences.
TS 8
Computer Graphics 9 Unit 1
3. Computer Art:
- Painting packages allow artists to create electronic paintings with various
brush strokes, widths, and colors.
- Photorealistic techniques, morphing, and animations are used for
commercial art and film production.
- Motion pictures, music videos, and computer games are forms of
entertainment that heavily rely on computer graphics.
TS 9
Computer Graphics 10 Unit 1
5. Visualization:
- Used for analyzing scientific, engineering, medical, and business data.
- Converting data into visual forms aids in understanding large volumes of
information more efficiently.
6. Image Processing:
- Involves modifying or interpreting existing images using various techniques.
- Widely used in medical applications for tasks like image enhancement,
segmentation, and analysis.
TS 10
Computer Graphics 11 Unit 1
TS 11
Computer Graphics 12 Unit 1
Point:
- Definition: A point in computer graphics typically refers to a location in a
two- or three-dimensional coordinate system, often represented by its x, y,
and sometimes z coordinates. It is a fundamental element used to define
geometric primitives such as lines, curves, and shapes.
- Example: In a 2D coordinate system, a point might be represented as (x,
y), where x and y are numerical values indicating its position along the
horizontal and vertical axes, respectively. For instance, the point (3, 5)
represents a location three units to the right and five units up from the origin.
Dot:
- Definition: In colloquial language, "dot" is often used interchangeably with
"point." In computer graphics, it typically refers to a small, round mark on a
screen or surface. While it can represent a geometric point, it is often used
more informally.
In the context of a printer, the term "dot" typically refers to a small mark or
spot produced by the printer's printing mechanism. Printers, especially older
ones, often use a technique called dot matrix printing or similar methods
where characters or images are formed by a matrix of small dots.
- Example: When using a drawing program, clicking the mouse creates dots
on the screen, each representing a point in the digital space. These dots can
be connected to form lines or shapes.
TS 12
Computer Graphics 13 Unit 1
picture.
Resolution:
Graphics Workstation:
TS 13
Computer Graphics 14 Unit 1
TS 14
Computer Graphics 15 Unit 1
Graphics Monitor:
i) The name itself giving some idea that, Monitor which is capable of
displaying “Graphics”. Generally most of the Monitors support Text modes.
ii) So Monitors which are capable of showing and supporting Graphics
mode along with the Text modes.
iii) Graphic monitors who can display pictures on its screen, of course it
acts like an output device. The monitors which support the following Graphic
applications are said to be Graphic Monitors.
TS 15
Computer Graphics 16 Unit 1
TS 16
Computer Graphics 17 Unit 1
TS 17
Computer Graphics 18 Unit 1
Component of CRT:
Electron Gun: The electron gun is made up of several elements, mainly a
heating filament (heater) and a cathode.
The electron gun is a source of electrons focused on a narrow beam
facing the CRT.
Focusing & Accelerating Anodes: These anodes are used to produce a
narrow and sharply focused beam of electrons.
Horizontal & Vertical Deflection Plates: These plates are used to guide the
path of the electron the beam. The plates produce an electromagnetic
field that bends the electron beam through the area as it travels.
Phosphorus-coated Screen: The phosphorus coated screen is used to
produce bright spots when the high-velocity electron beam hits it.
TS 18
Computer Graphics 19 Unit 1
It is similar to a CRT monitor. The basic idea behind the color CRT monitor is
to combine three basic colors- Red, Green, and Blue. By using these three
colors, we can produce millions of different colors.
A powerful electron beam penetrates the CRT, it passes through the red layer
and excites the green layer within. A beam with slow electrons excites only
the red layer. A beam with the medium speed of electrons, a mixture of red
and green light is emitted to display two more colors- orange and yellow.
TS 19
Computer Graphics 20 Unit 1
Structure:
1. It has three phosphorus color dots at each position of the pixel
Working:
A Shadow Mask is a metal plate with tiny holes present inside a color
monitor.
A Shadow Mask directs the beam by consuming the electrons so that the
beam hits only the desired point and displays a resulting picture.
It has three different guns.
These guns direct their beams to shadow mask, which allows them to
pass.
It is a task of a shadow mask to direct the beam on its particular dot on
the screen and produce a picture on the screen.
A Shadow Mask can display a wider range of pictures than beam
penetration.
Advantages:
1. Display a wider range picture.
2. Display realistic images.
3. 3. In-line arrangement of RGB color.
TS 20
Computer Graphics 21 Unit 1
Disadvantages:
1) Difficult to cover all three beams on the same hole.
2) Poor Resolution
TS 21
Computer Graphics 22 Unit 1
TS 22
Computer Graphics 23 Unit 1
TS 23
Computer Graphics 24 Unit 1
TS 24
Computer Graphics 25 Unit 1
There are two ways Random scan and Raster scan by which we can
display an object on the screen.
1. Raster Scan
TS 25
Computer Graphics 26 Unit 1
After all the line-drawing commands are processed, the system cycles
back to the first line command in the list.
Random-scan displays are designed to draw all the component lines of a
picture 30 to 60 times each second.
Pipeline
A pipeline refers to a series of stages or steps through which graphical data passes in order
to be processed and rendered onto a display device. The graphics pipeline encompasses
various operations involved in generating images, including geometry processing,
rasterization, shading, and output to the screen.
1. Application Stage:
- The graphics pipeline begins with the application stage, where higher-level operations
such as scene setup, object transformations, and camera positioning are performed.
Application programs, such as 3D modeling software or video games, generate instructions
and data to describe the scene to be rendered.
3. Rasterization Stage:
- Rasterization converts the geometric primitives (such as triangles or lines) generated in
the previous stage into fragments or pixels that correspond to points on the screen. Each
primitive is rasterized into a set of pixels, which are then processed further in subsequent
stages.
4. Vertex Shader:
- The vertex shader is a programmable stage in the graphics pipeline responsible for
manipulating individual vertices (points) of geometry. It can perform operations such as
lighting calculations, texture coordinate transformations, and vertex deformation.
5. Fragment Shader:
- The fragment shader, also known as the pixel shader, operates on each pixel generated
during rasterization. It calculates the final color of each pixel based on various factors such as
lighting, texture mapping, shading models, and material properties.
TS 26
Computer Graphics 27 Unit 1
alpha blending (combining colors from different fragments), and stencil testing (masking
fragments based on a stencil buffer).
The graphics pipeline is highly parallelized and optimized for efficiency, allowing for real-time
rendering of complex 3D scenes and animations in applications such as video games,
computer-aided design (CAD), virtual reality (VR), and scientific visualization. Each stage in
the pipeline performs specific tasks to transform and manipulate the graphical data, ultimately
resulting in the generation of visually compelling images and animations.
Aliasing Problem
TS 27
Computer Graphics 28 Unit 1
There are four methods of Anti-Aliasing. These methods are mentioned below.
High-Resolution Display
Post-Fingering
Pre-Filtering
Pixel Phasing
One way to reduce the aliasing effect and increase the sampling rate is to
simply display objects at a higher resolution. Using high resolution, the jaggies
become so small that they become indistinguishable from the human eye.
Hence, jagged edges get blurred out and edges appear smooth.
TS 28
Computer Graphics 29 Unit 1
computational cost. This technique was widely used in the early days when
better AA techniques were not available. Different modes of SSAA available
are: 2X, 4X, 8X, etc. denoting that sampling is done x times (more than) the
current resolution. A better style of Anti-Aliasing is MSAA (Multisampling
Antialiasing) which is a faster and more approximate style of supersampling
AA. It has a lesser computational cost. Better and more sophisticated
supersampling techniques are developed by graphics card companies like
CSAA by NVIDIA and CFAA by AMD.
Example: Suppose, a line passes through two pixels. The pixel covering a
bigger portion(90%) of the line displays 90% intensity while less area(10%)
covering the pixel displays 10-15% intensity. If the pixel area overlaps with
different color areas, then the final pixel color is taken as an average of colors
of the overlap area. This method is also known as pre-filtering as this
procedure is done BEFORE generating the rasterized image. It’s done using
some graphics primitive algorithms.
4. Pixel Phasing
It’s a technique to remove aliasing. Here pixel positions are shifted to nearly
approximate positions near object geometry. Some systems allow the size of
individual pixels to be adjusted for distributing intensities which is helpful in
pixel phasing.
TS 29
Computer Graphics 30 Unit 1
Input Devices
Following are some of the important input devices which are used in a
computer −
Keyboard
Mouse
Joy Stick
Light pen
Track Ball
Scanner
Graphic Tablet
Microphone
Magnetic Ink Card Reader(MICR)
Optical Character Reader(OCR)
Bar Code Reader
Optical Mark Reader(OMR)
TS 30
Computer Graphics 31 Unit 1
TS 31
Computer Graphics 32 Unit 1
TS 32
Computer Graphics 33 Unit 1
TS 33
Computer Graphics 34 Unit 1
TS 34
Computer Graphics 35 Unit 1
TS 35
Computer Graphics 36 Unit 1
TS 36
Computer Graphics 37 Unit 1
TS 37
Computer Graphics 38 Unit 1
TS 38
Computer Graphics 39 Unit 1
TS 39
Computer Graphics 40 Unit 1
TS 40
Computer Graphics 41 Unit 1
TS 41