0% found this document useful (0 votes)
37 views11 pages

CG 1

The document provides an introduction to computer graphics, including its applications in entertainment, science, design, education, medicine, and business. It discusses non-interactive and interactive graphics, introducing concepts like human-computer interaction, interaction techniques, input devices, rendering techniques, and algorithms that support interactive graphics. It also covers topics such as raster and random scan displays, characteristics of display devices, aliasing and anti-aliasing, and latest display technologies including LED, OLED, and curved LED displays. Finally, it briefly discusses the process of scan conversion in computer graphics.

Uploaded by

Pratham Kangra
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)
37 views11 pages

CG 1

The document provides an introduction to computer graphics, including its applications in entertainment, science, design, education, medicine, and business. It discusses non-interactive and interactive graphics, introducing concepts like human-computer interaction, interaction techniques, input devices, rendering techniques, and algorithms that support interactive graphics. It also covers topics such as raster and random scan displays, characteristics of display devices, aliasing and anti-aliasing, and latest display technologies including LED, OLED, and curved LED displays. Finally, it briefly discusses the process of scan conversion in computer graphics.

Uploaded by

Pratham Kangra
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
You are on page 1/ 11

COMPUTER

GRAPHICS
SEMESTER 5
UNIT - 1

HI COLLEGE
SYLLABUS
UNIT - 1

HI COLLEGE
INTRODUCTION TO COMPUTER GRAPHICS,

INTRODUCTION
Computer graphics is the use of computers to create and manipulate visual
images. It is a vast field that encompasses many different techniques, including
2D graphics, 3D graphics: Animation, Rendering, Image processing.

APPLICATIONS OF COMPUTER GRAPHICS


Entertainment: Computer graphics are used to create special effects and
realistic images in movies, video games, and television shows.

Science and engineering: Computer graphics is used to visualise and


analyse data, and to create simulations of physical systems.

Design: Computer graphics is used to create and prototype products, and to


design buildings and other structures.

Education: Computer graphics is used to create educational materials, such


as diagrams and animations.

Medicine: Computer graphics are used to create medical images, such as X-


rays and MRI scans, and to develop surgical simulations.

Business: Computer graphics are used to create presentations, charts, and


other visual aids.

Manufacturing: Computer graphics is used to create computer-aided design


(CAD) models and to control manufacturing processes.

kya baat hai!mazza aa gya


HiCollege Click Here For More Notes 01
NON INTERACTIVE AND INTERACTIVE GRAPHICS,

CONCEPTUAL FRAMEWORK FOR INTERACTIVE GRAPHICS


1. Human-Computer Interaction (HCI): This is the study of how people interact
with computers and other digital devices. HCI principles are used to design
interfaces that are easy to use, efficient, and effective. For interactive
graphics, HCI is particularly important because it concerns the user's
experience with the graphical user interface (GUI) and how it interacts with
the user's cognitive processes.
2. Interaction Techniques: These are the methods used to manipulate objects
in the graphical interface. They may include pointing, dragging, rotating,
scaling, and other actions. A good interaction technique is one that
facilitates easy and intuitive manipulation of objects, without causing errors
or confusion.
3. Input Devices: These are the hardware devices that allow users to provide
input to graphical applications. They may include a keyboard, mouse, touch
screen, stylus, or other devices. Input devices play a significant role in the
usability of interactive graphics, as they provide the means by which users
can manipulate objects in the scene.

HiCollege Click Here For More Notes 02


4. Rendering Techniques: These are the methods used to display digital
content on a screen or other output device. They may include techniques such
as rasterization, ray tracing, and real-time rendering. The choice of rendering
technique depends on the application's requirements, the hardware
capabilities, and the desired visual quality.

5. Algorithms: These are the mathematical calculations that support interactive


graphics. They may include algorithms for 3D modeling, animation, physics
simulation, and image processing. The choice of algorithm depends on the
specific application's requirements.

INTRODUCTION TO RASTER AND RANDOM SCAN DISPLAY


Raster display uses a grid of pixels, with each pixel representing a small area on
the screen that can be individually controlled to generate the image. Raster
displays are commonly used in modern computer monitors, televisions, and
other digital displays. Each pixel on the screen is assigned a color value, which
is stored in a memory location and displayed on the screen. Raster displays are
characterized by their high resolution, fast refresh rates, and low cost.

Random scan display, on the other hand, uses a beam of electrons to generate
the image on the screen. This beam is directed over the screen by a magnetic
field and is used to illuminate phosphors on the display. The phosphors emit
light in response to the electron beam, creating the image on the screen.
Random scan displays are also known as vector displays and are commonly
used in older computer systems and specialized graphics applications.

One advantage of random scan displays is that they can draw lines and shapes
more quickly than raster displays. This is because the electron beam can move
more quickly than the method used to update the pixels on a raster display.
However, random scan displays generally have lower resolution and can only
display a limited number of colors.
Random Scan Display

HiCollege Click Here For More Notes 03


CHARACTERISTICS OF DISPLAY DEVICES,
1. Resolution: Resolution refers to the number of pixels (or dots) that can be
displayed on the screen. Higher resolutions provide more detail and greater
visual clarity, but also require more processing power and higher bandwidth to
display.

2. Contrast: Contrast refers to the difference between the lightest and darkest
areas of the screen. Displays with higher contrast ratios provide sharper and
more detailed images.

3. Refresh rate: Refresh rate refers to how quickly the display can update the
screen images. Higher refresh rates help to prevent flickering and improve the
fluidity of motion on the screen.

4. Viewing angle: The viewing angle refers to the angle at which the user can
view the screen without significant degradation of image quality. Displays with
wider viewing angles can be viewed from more angles without distortion.

5. Color reproduction: The ability of display devices to accurately reproduce


colors varies widely. Higher-end systems with advanced color management
systems can provide more accurate and consistent color reproduction.

6. Size and aspect ratio: The size and aspect ratio of the display device can
affect how content is presented and perceived. Wider aspect ratios are better
suited for video content, while taller aspect ratios can be better for text-based
content.

7. Brightness and luminance: The brightness and luminance of a display


determine how much light the screen emits, which affects how easy it is to
view in a variety of lighting conditions.

HiCollege Click Here For More Notes 04


ALIASING AND ANTIALIASING,
Aliasing and Antialiasing are two concepts related to the representation of
images on a digital display.

Aliasing occurs when an image is displayed with jagged or pixelated edges,


resulting in a staircase-like appearance. This is caused by the low sampling rate
of the digital display, which cannot display a smooth curve or line. Aliasing is
more noticeable in images with high contrast edges or fine details. It can be
reduced by increasing the display resolution, which allows for more precise
rendering of the edges.

Antialiasing is a method for reducing aliasing in digital images by smoothing


out jagged edges and minimizing pixelation. This is done by applying
smoothing techniques, such as blurring or averaging, to the edges of the image,
which reduces the contrast between neighboring pixels and creates a
smoother transition between colors. Antialiasing can be applied at different
stages of the image processing pipeline - at the level of graphics hardware,
image processing software, or display technology.

Antialiasing techniques can be classified into two types: spatial and temporal.
Spatial antialiasing is applied by altering the spatial position of the pixels,
reducing the resolution, or increasing the sampling rate. Temporal antialiasing
is applied by analyzing several frames of the image and using a motion
estimation process to reduce the temporal variance of the images, which can
cause aliasing artifacts.

HiCollege Click Here For More Notes 05


INTRODUCTION TO LATEST DISPLAY TECHNOLOGIES
1. LED displays: LED stands for Light Emitting Diode. An LED display is made up
of multiple LEDs, which emit light when an electric current is passed through
them. LED displays are commonly used in large outdoor displays, billboards,
and stadium screens. They are known for their brightness, sharpness, and
durability. LED displays can be manufactured in various sizes, shapes, and
resolutions.

2. OLED displays: OLED stands for Organic Light Emitting Diode. OLED displays
are made up of organic materials, which emit light when an electric current is
passed through them. OLED technology is used in modern phones, televisions,
and monitors. OLED displays provide a higher contrast ratio, better color
accuracy, and deeper blacks than LED displays. They are also thinner and more
energy-efficient.

3. Curved LED displays: Curved LED displays are made up of curved LED panels,
which are arranged in a curved shape to create a more immersive viewing
experience. These displays are commonly used in theaters, museums, and other
entertainment venues. The curved display panel helps to reduce reflections,
improve viewing angles, and provide a more natural focal length for the human
eye.

Overall, LED, OLED, and Curved LED displays are advanced technologies that
have revolutionized the display industry. They provide higher brightness,
contrast, color accuracy, and thus offer a more immersive viewing experience.
These displays are increasingly popular for applications ranging from home
entertainment to large-scale advertising.

HiCollege Click Here For More Notes 06


SCAN CONVERSION
Scan conversion in computer graphics is the process of converting a geometric
representation of an object, such as a line, curve, or polygon, into a pixel-based
representation that can be displayed on a computer screen or printed on a
page.

Imagine a picture that is drawn on a piece of paper. The picture is made up of


continuous lines and curves. However, when we scan the picture into a
computer, it is converted into a grid of pixels. Each pixel is a tiny square that has
a specific colour. The scan converter determines the colour of each pixel based
on the information in the original picture.

SCAN CONVERTING LINES USING DDA & BRESENHAM‘S


ALGORITHM
DDA ALGORITHM:
The DDA (Digital Differential Analyzer) algorithm is a simple yet effective scan
conversion algorithm for lines. It works by calculating increments in x and y
directions based on the slopes of the line. The algorithm then samples the line
at equally spaced intervals and plots a pixel at each sample point. Below are
the general steps of the DDA algorithm:
1. Calculate the slopes of the line: m = (y2 - y1) / (x2 - x1)
2. Determine the number of pixels to be drawn: N = max( |x2 - x1|, |y2 - y1| )
3. Calculate the incremental values of x and y: dx = (x2 - x1) / N and dy = (y2 - y1) /
N
4. Starting from (x1,y1), for each i = 1,2,3 ...... N, calculate xi and yi using the
following formulas:
xi+1 = xi + dx
yi+1 = yi + dy
5. Round off (xi, yi) to find the nearest pixel and plot the pixel at that point.
For example, suppose we want to draw a line from (2,3) to (7,9) using DDA
algorithm.
First, we calculate the slope of the line: m = (9 - 3) / (7 - 2) = 1.2. Then we
determine the number of pixels to be drawn: N = max( |7 - 2|, |9 - 3| ) = 6.
We calculate the incremental values of x and y: dx = (7 - 2) / 6 = 1 and dy = (9 - 3) /
6 = 1.
We start from (2,3) and compute (3,4), (4,5), (5,6), (6,7), (7,8), (8,9) using the
formulas xi+1 = xi + dx and yi+1 = yi + dy.
We round off each point to find its nearest pixel and plot the pixel at that point.

HiCollege Click Here For More Notes 07


BRESENHAM'S ALGORITHM:
Bresenham's line algorithm is an efficient algorithm used for scan converting
lines. It was developed by Jack E. Bresenham and uses only integer arithmetic
to draw lines. The key idea behind Bresenham's algorithm is to avoid floating-
point calculations in order to minimize computational overhead. Below are the
general steps of the Bresenham's line algorithm:

1. Initialize x and y coordinates to the first endpoint of the line (x1, y1).
2. Calculate the differences between the x and y coordinates of the two
endpoints: dx = x2 - x1 and dy = y2 - y1.
3. Initialize the decision variable, d, to (2 * dy - dx).
4. While x <= x2:
A. Plot the pixel at (x,y).
B. If d > 0, increment y by 1 and update d: d = d + (2 * dy - 2 * dx).
C. Increment x by 1 and update d: d = d + 2 * dy.
5. Repeat step 4 until x = x2.

For example, suppose we want to draw a line from (2,3) to (7,9) using
Bresenham's algorithm. We calculate the differences between the x and y
coordinates of the two endpoints: dx = 7 - 2 = 5 and dy = 9 - 3 = 6. We initialize
the decision variable, d, to (2 * dy - dx) = 9. We start from (2,3) and calculate d for
each x-coordinate in the line as follows:

- x = 2, y = 3, d = 9, plot the pixel at (2,3)


- x = 3, y = 4, d = 13, plot the pixel at (3,4)
- x = 4, y = 5, d = 5, plot the pixel at (4,5)
- x = 5, y = 6, d = 9, plot the pixel at (5,6)
- x = 6, y = 7, d = 13, plot the pixel at (6,7)
- x = 7, y = 8, d = 5, plot the pixel at (7,8)
- x = 8, y = 9, d = 9, plot the pixel at (8,9)

By the end of this process, we have drawn a line from (2,3) to (7,9) using
Bresenham's algorithm.

for better clarity watch now

HiCollege Click Here For More Notes 08


SCAN CONVERTING CIRCLES USING BRESENHAM‟S ALGORITHM.
Drawing a circle on the screen is a little complex than drawing a line. There are
two popular algorithms for generating a circle − Bresenham’s Algorithm and
Midpoint Circle Algorithm.
The equation of circle is X2+Y2=r2,
where r is radius.
We cannot display a continuous arc on the raster display. Instead, we have to
choose the nearest pixel position to complete the arc.
FOR EXAMPLE ➖
Draw a circle with center (50,50)and radius 20 by using bresenham algorithm​
Let r = 10 (Given)
Step1: Take initial point (0, 10)
d = 3 - 2r
d = 3 - 2 * 10 = -17
d<0 ∴ d = d + 4x + 6
= -17 + 4 (0) + 6
= -11
Step2: Plot (1, 10)

d = d + 4x + 6 ( d < 0)
= -11 + 4 (1) + 6
= -1
Step3: Plot (2, 10)

d = d + 4x + 6 ( d < 0)
= -1 + 4 x 2 + 6
= 13
Step4: Plot (3, 9) d is > 0 so x = x + 1, y = y - 1

d = d + 4 (x-y) + 10 ( d > 0)
= 13 + 4 (3-9) + 10
= 13 + 4 (-6) + 10
= 23-24=-1
Step5: Plot (4, 9)
d = -1 + 4x + 6
= -1 + 4 (4) + 6
= 21
Step6: Plot (5, 8)

d = d + 4 (x-y) + 10 ( d > 0) P3 (2,10)⟹(52,60)
= 21 + 4 (5-8) + 10 P4 (3,9)⟹(53,59)
= 21-12 + 10 = 19 P5 (4,9)⟹(54,59)
So P1 (0,0)⟹(50,50) P6 (5,8)⟹(55,58)
P2 (1,10)⟹(51,60)

HiCollege Click Here For More Notes 09

You might also like