Notes Computer Graphics
Notes Computer Graphics
Unit -1
For Example:
Ping-pong game.
Drawing on touch screens.
Display weather forecast or other moving charts/graphs on the screen.
Animating pictures or graphics in movies.
Graphics animation in video games.
1. Display controller or video controller- It’s a Memory Buffer and TV Monitor interface. Its task is to
pass Frame Buffer’s contents to the monitor. The display controller reads each continuous byte of Memory
frame buffer data and converts 0’s and 1’s into appropriate video signals.
In today’s term, the display controller is recognized as a display card, and one of our choices can be a
VGA(Video Graphics Array) card with a resolution of 640×480. Display Controller is also capable of
displaying the image in colors.
2. Digital memory or frame buffer-This is a place where images and pictures are stored as an array (matrix
of 0 & 1, 0 represents darkness, and 1 represents image or picture). It is also called a frame buffer.
In today’s term frame buffer is called V-RAM (video RAM), and it helps to store the image in bit form. It
helps to increase the speed of graphics.
3. Television monitor- Monitor helps us to view the display, and they make use of CRT(Cathode ray tube)
technology.
Advantages
1. Superior Quality.
2. More accurate outcomes or products.
3. Increased Productivity.
4. Lower cost of development.
5. Increases the ability to understand information and interpret patterns significantly.
Dr.Savan Payasi/Assistant Professor AKSU/Computer Science Department
Computer Graphics and Multimedia System
For Example:
Screen savers.
Map representation of the data.
Graphic elements are used in the text, document, and PDF presentation.
Static images are used in mobile applications and websites.
Business graphics are used as brochures, business cards, menu of the hotel.
Representation of graphics
We can represent the graphics by following two ways:
1. Raster Graphics: In raster graphics, the image is presented as a rectangular grid of colored squares.
Raster images are also called bitmap images. Bitmap images are stored as the collection of small individual
dots called pixels.
Bitmap images require high resolution and anti-aliasing for a smooth appearance.
2. Vector Graphics: In vector graphics, the image is represented in the form of continuous geometric
objects: line, curve, etc.
Vector images are not based on pixel pattern. They use mathematical formulas to draw line and curves. The
lines and curves can be combined to create an image.
Raster images are the collection of the The Vector images are composed of
pixel. paths.
Raster image takes less space to store. Vector image takes more space.
Raster graphics can draw mathematical Vector graphics can only draw
curves, polygons, and boundaries. continuous and smooth lines.
File Extension: .BMP, .TIF, .JPG etc. File Extension: .SVG, .PDF, .AI etc.
Computer graphics is an art of drawing pictures on computer screens with the help of programming. It
involves computations, creation, and manipulation of data. In other words, we can say that computer
graphics is a rendering tool for the generation and manipulation of images.
CRT
CRT stands for Cathode ray tube. It is a technology which is used in traditional computer monitor and
television.
Cathode ray tube is a particular type of vacuum tube that displays images when an electron beam collides
on the radiant surface.
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.
The main element of a video monitor is the Cathode Ray Tube CRT, shown in the following illustration.
There are two ways Random scan and Raster scan by which we can display an object on the screen.
Raster Scan
In a raster scan system, the electron beam is swept across the screen, one 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 the Refresh Buffer or Frame Buffer. This memory area
holds the set of intensity values for all the screen points. Stored intensity values are then retrieved from the
refresh buffer and “painted” on the screen one row scan line at a time as shown in the following illustration.
Each screen point is referred to as a pixel picture element or pel. At the end of each scan line, the electron
beam returns to the left side of the screen to begin displaying the next scan line.
Picture definition is stored as a set of line-drawing commands in an area of memory referred to as the refresh
display file. To display a specified picture, the system cycles through the set of commands in the display
file, drawing each component line in turn. 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.
Computer Graphics has numerous applications, some of which are listed below −
Computer graphics user interfaces GUIs − A graphic, mouse-oriented paradigm which allows the
user to interact with a computer.
Business presentation graphics − "A picture is worth a thousand words".
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.
Advantages:
1. Better Resolution
2. Half cost
3. Inexpensive
Disadvantages:
1. Only four possible colors
2. Time Consuming
2. Shadow–Mask Method: It is used with a raster scan monitor for displaying pictures. It has more range
of color than the beam penetration method. It is used in television sets and monitors.
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. In-line arrangement of RGB color.
Disadvantages:
Difficult to cover all three beams on the same hole.
Poor Resolution.
Liquid crystal display (LCD): The LCD depends upon the light modulating properties of liquid crystals.
LCD is used in watches and portable computers. LCD requires an AC power supply instead of DC, so it is
difficult to use it in circuits. It generally works on flat panel display technology. LCD consumes less power
than LED. The LCD screen uses the liquid crystal to turn pixels on or off. Liquid Crystals are a mixture of
solid and liquid. When the current flows inside it, its position changes into the desired color.
Advantages:
1. Produce a bright image
2. Energy efficient
3. Completely flat screen
Disadvantages:
1. Fixed aspect ratio & Resolution
2. Lower Contrast
3. More Expensive
Light Emitting Diode (LED): LED is a device which emits when current passes through it. It is a
semiconductor device. The size of the LED is small, so we can easily make any display unit by arranging a
large number of LEDs. LED consumes more power compared to LCD. LED is used on TV, smartphones,
motor vehicles, traffic light, etc. LEDs are powerful in structure, so they are capable of withstanding
mechanical pressure. LED also works at high temperatures.
Advantages:
1. The Intensity of light can be controlled.
2. Low operational Voltage.
3. Capable of handling the high temperature.
Disadvantages:
More Power Consuming than LCD
Direct View Storage Tube (DVST): It is used to store the picture information as a charge distribution
behind the phosphor-coated screen.There are two guns used in DVST:
Advantages:
1. Less Time Consuming
2. No Refreshing Required
3. High-Resolution
4. Less Cost
Disadvantages:
1. The specific part of the image cannot be erased.
2. They do not display color.
Plasma Display: It is a type of flat panel display which uses tiny plasma cells. It is also known as the Gas-
Discharge display.
Advantages:
1. Wall Mounted
2. Slim
3. Wider angle
Disadvantages:
1. Phosphorus loses luminosity over time.
2. It consumes more electricity than LCD.
3. Large Size
3D Display: It is also called stereoscope display technology. This technology is capable of bringing depth
perception to the viewer. It is used for 3D gaming and 3D TVs.
Advantages:
Impressive Picture Quality
High Definition
Motion Communicates
Disadvantage:
Expensive
Binocular Fusion
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)
Keyboard
Keyboard is the most common and very popular input device which helps to input data to the computer. The
layout of the keyboard is like that of traditional typewriter, although there are some additional keys provided
for performing additional functions.
Keyboards are of two sizes 84 keys or 101/102 keys, but now keyboards with 104 keys or 108 keys are also
available for Windows and Internet.
Typing Keys
1
These keys include the letter keys (A-Z) and digit keys (09) which generally give the
same layout as that of typewriters.
Numeric Keypad
2 It is used to enter the numeric data or cursor movement. Generally, it consists of a set
of 17 keys that are laid out in the same configuration used by most adding machines
and calculators.
Function Keys
3 The twelve function keys are present on the keyboard which are arranged in a row at
the top of the keyboard. Each function key has a unique meaning and is used for some
specific purpose.
Control keys
4 These keys provide cursor and screen control. It includes four directional arrow keys.
Control keys also include Home, End, Insert, Delete, Page Up, Page Down,
Control(Ctrl), Alternate(Alt), Escape(Esc).
Mouse
Mouse is the most popular pointing device. It is a very famous cursor-control device having a small palm
size box with a round ball at its base, which senses the movement of the mouse and sends corresponding
signals to the CPU when the mouse buttons are pressed.
Generally, it has two buttons called the left and the right button and a wheel is present between the buttons.
A mouse can be used to control the position of the cursor on the screen, but it cannot be used to enter text
into the computer.
Advantages
Easy to use
Not very expensive
Moves the cursor faster than the arrow keys of the keyboard.
Joystick
Joystick is also a pointing device, which is used to move the cursor position on a monitor screen. It is a stick
having a spherical ball at its both lower and upper ends. The lower spherical ball moves in a socket. The
joystick can be moved in all four directions.
The function of the joystick is similar to that of a mouse. It is mainly used in Computer Aided Designing
(CAD) and playing computer games.
Light Pen
Light pen is a pointing device similar to a pen. It is used to select a displayed menu item or draw pictures
on the monitor screen. It consists of a photocell and an optical system placed in a small tube.
When the tip of a light pen is moved over the monitor screen and the pen button is pressed, its photocell
sensing element detects the screen location and sends the corresponding signal to the CPU.
Track Ball
Track ball is an input device that is mostly used in notebook or laptop computer, instead of a mouse. This is
a ball which is half inserted and by moving fingers on the ball, the pointer can be moved.
Since the whole device is not moved, a track ball requires less space than a mouse. A track ball comes in
various shapes like a ball, a button, or a square.
Scanner
Scanner is an input device, which works more like a photocopy machine. It is used when some information
is available on paper and it is to be transferred to the hard disk of the computer for further manipulation.
Scanner captures images from the source which are then converted into a digital form that can be stored on
the disk. These images can be edited before they are printed.
Digitizer
Digitizer is an input device which converts analog information into digital form. Digitizer can convert a
signal from the television or camera into a series of numbers that could be stored in a computer. They can
be used by the computer to create a picture of whatever the camera had been pointed at.
Digitizer is also known as Tablet or Graphics Tablet as it converts graphics and pictorial data into binary
inputs. A graphic tablet as digitizer is used for fine works of drawing and image manipulation applications.
Microphone
Microphone is an input device to input sound that is then stored in a digital form.
The microphone is used for various applications such as adding sound to a multimedia presentation or for
mixing music.
This reading process is called Magnetic Ink Character Recognition (MICR). The main advantages of MICR
is that it is fast and less error prone.
OCR scans the text optically, character by character, converts them into a machine readable code, and stores
the text on the system memory.
Bar Code Reader scans a bar code image, converts it into an alphanumeric value, which is then fed to the
It is specially used for checking the answer sheets of examinations having multiple choice questions.
Output Devices
An output device is a component of hardware or the main physical part of a computer that can be touched
and seen. An output device is an electromechanical device.
“The Computer gives instructions and data from input devices and processes it and returns the result
called as output.”
Printers:
A printer is a peripheral device which is used to represent the graphics or text on paper. The quality is
measured by its resolution. The resolution of any printer is measured in dot per inch (dpi).
The printer usually works with the computer and connected via a cable. In present, many digital device
support printer features so that we can use Bluetooth, Wi-fi, and cloud technology to print.
Types of Printers
Impact Printers
Non-impact Printers
Impact Printers
In impact printers, there is a physical contact established between the print head, ribbon, ink-cartridge, and
paper.
The printers hit print head on an ink-filled ribbon than the letter prints on the paper. Impact printers are
works like a typewriter.
Impact printers print the characters by striking them on the ribbon, which is then pressed on the paper.
Character printers
Line printers
Character Printers
Character printers are the printers which print one character at a time.
In the market, one of the most popular printers is Dot Matrix Printer. These printers are popular because of
their ease of printing and economical price. Each character printed is in the form of pattern of dots and head
consists of a Matrix of Pins of size (5*7, 7*9, 9*7 or 9*9) which come out to form a character which is why
Advantages
Inexpensive
Widely Used
Other language characters can be printed
Disadvantages
Slow Speed
Poor Quality
Daisy Wheel
Head is lying on a wheel and pins corresponding to characters are like petals of Daisy (flower) which is why
it is called Daisy Wheel Printer. These printers are generally used for word-processing in offices that require
a few letters to be sent here and there with very nice quality.
Advantages
More reliable than DMP
Better quality
Dr.Savan Payasi/Assistant Professor AKSU/Computer Science Department
Computer Graphics and Multimedia System
Disadvantages
Slower than DMP
Noisy
More expensive than DMP
Line Printers
Line printers are the printers which print one line at a time.
Drum Printer
Chain Printer
Drum Printer
This printer is like a drum in shape hence it is called drum printer. The surface of the drum is divided into a
number of tracks. Total tracks are equal to the size of the paper, i.e. for a paper width of 132 characters,
drum will have 132 tracks. A character set is embossed on the track. Different character sets available in the
market are 48 character set, 64 and 96 characters set. One rotation of drum prints one line. Drum printers
are fast in speed and can print 300 to 2000 lines per minute.
Advantages
Very high speed
Disadvantages
Very expensive
Dr.Savan Payasi/Assistant Professor AKSU/Computer Science Department
Computer Graphics and Multimedia System
Chain Printer
In this printer, a chain of character sets is used, hence it is called Chain Printer. A standard character set may
have 48, 64, or 96 characters.
Advantages
Character fonts can easily be changed.
Different languages can be used with the same printer.
Disadvantages
Noisy
Non-impact Printers
Non-impact printers print the characters without using the ribbon. These printers print a complete page at a
time, thus they are also called as Page Printers.
Laser Printers
Inkjet Printers
Laser Printers
These are non-impact page printers. They use laser lights to produce the dots needed to form the characters
to be printed on a page.
Dr.Savan Payasi/Assistant Professor AKSU/Computer Science Department
Computer Graphics and Multimedia System
Advantages
Very high speed
Very high quality output
Good graphics quality
Supports many fonts and different character size
Disadvantages
Expensive
Cannot be used to produce multiple copies of a document in a single printing
Inkjet Printers
Inkjet printers are non-impact character printers based on a relatively new technology. They print characters
by spraying small drops of ink onto paper. Inkjet printers produce high quality output with presentable
features.
They make less noise because no hammering is done and these have many styles of printing modes available.
Color printing is also possible. Some models of Inkjet printers can produce multiple copies of printing also.
Advantages
High quality printing
More reliable
Disadvantages
Expensive as the cost per page is high
Slow as compared to laser printer
Monitors
Monitors, commonly called as Visual Display Unit (VDU), are the main output device of a computer. It
forms images from tiny dots, called pixels that are arranged in a rectangular form. The sharpness of the
image depends upon the number of pixels.
A finite number of characters can be displayed on a screen at once. The screen can be divided into a series
of character boxes - fixed location on the screen where a standard character can be placed. Most screens are
capable of displaying 80 characters of data horizontally and 25 lines vertically.
Large in Size
High power consumption
Emissive Displays − Emissive displays are devices that convert electrical energy into light. For
example, plasma panel and LED (Light-Emitting Diodes).
Non-Emissive Displays − Non-emissive displays use optical effects to convert sunlight or light from
some other source into graphics patterns. For example, LCD (Liquid-Crystal Device).
Plotters:
A plotter is a special type of output device. It is used to print large graphs, large designs on a large paper. For
Example: Construction maps, engineering drawings, architectural plans, and business charts, etc.
Types of Plotter
1. Flatbed Plotter: In a flatbed plotter, the paper is kept in a stationary position on a table or a tray. A
flatbed plotter has more than one pen and a holder. The pen rotates on the paper upside-down and
right-left by the using of a motor.
Every pen has a different color ink, which is used to draw the multicolor design.
We can quickly draw the following designs by using a flatbed printer.
For: Cars, Ships, Airplanes, Dress design, road and highway blueprints, etc.
2. Drum Plotter: It is also called “Roller plotter.” There is a drum in this plotter. We can apply the paper
on the drum. When the plotter works, these drums moves back and forth, and the image is drawn.
Drum plotter has more than one pen and penholders. The pens easily moves right to left and left to right.
The movement of pens and drums are controlled by graph plotting program.It is used in industry to produce
large drawings (up to A0).
1. Very costly
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.
Workstation:
i).Workstation is also a computer which varies generally with other General Computers
ii).Because these Workstations need good operating power of computer. They must be able to
support high power i.e. it must sustain good graphic capabilities.
iii).These kind of computers comes with the following specifications. Unlike normal general
computers they consists of,
A).Minimum of 64 Megabytes of
RAM B).Very good Resolution
Graphics screen C).High and
Large Screen
D).GUI Graphical User Interface (which helps programs easier to use of the Computer’s
Graphics) E).Very good Mass storage Device like Disk Drive
v) Workstations took place of and they lie between Personal computer (General
Computers) and minicomputers as far as Computing power is concerned.
vi) These can be used as both types such as stand system (which only consists of one) and
Local area network. So basically in this LAN kind, workstations are typically connected
together one and other.
UNIX:
UNIX is a multitasking operating system. Unix Operating System are to be written in High level
programming language, which we can simply say C language. This Unix Operating System is
with very flexible and so most commonly used in Workstations.
Windows NT:
Windows NT is also referred as Windows New Technology. It is also a most commonly used
Operating system for workstations. This Windows NT highly supports multitasking works and
Windows NT has its other versions are such as Windows NT Server and Windows NT
Workstation.
Coordinate representations
Except few all other general packages are designed to be used with Cartesian coordinate
specifications.
If coordinate values for a picture are specified is some other reference frame they must
be converted to Cartesian coordinate before giving input to graphics package.
Special-purpose package may allow use of other coordinates which suits application.
In general several different Cartesian reference frames are used to construct and display
scene.
We can construct shape of object with separate coordinate system called modeling
coordinates or sometimes local coordinates or master coordinates.
Once individual object shapes have been specified we can place the objects into
appropriate positions called world coordinates.
Finally the World-coordinates description of the scene is transferred to one or more
output device reference frame for display. These display coordinates system are referred
to as “Device Coordinates” or “Screen Coordinates”.
Generally a graphic system first converts the world-coordinates position to normalized
device coordinates. In the range from 0 to 1 before final conversion to specific device
coordinates.
Xdc,Ydc).
Graphic Function
A general purpose graphics package provides user with Varity of function for creating and
manipulating pictures.
The basic building blocks for pictures are referred to as output primitives. They
includes character, string, and geometry entities such as point, straight lines, curved
lines, filled areas and shapes defined with arrays of color points.
Input functions are used for control & process the various input device such as mouse,
tablet, etc.
Control operations are used to controlling and housekeeping tasks such as clearing
display screen etc.
All such inbuilt function which we can use for our purpose are known as graphics function
Software Standard
Primary goal of standardize graphics software is portability so that it can be used in any
hardware systems & avoid rewriting of software program for different system
Some of these standards are
discuss below Graphical Kernel System
(GKS)
This system was adopted as a first graphics software standard by the international standard
organization (ISO) and various national standard organizations including ANSI.
GKS was originally designed as the two dimensional graphics package and then later
extension was developed for three dimensions.
The Line drawing algorithm is a graphical algorithm which is used to represent the line segment on
discrete graphical media, i.e., printer and pixel-based media.
An algorithm should be precise: Each step of the algorithm must be adequately defined.
Finiteness: An algorithm must contain finiteness. It means the algorithm stops after the
execution of all steps.
Easy to understand: An algorithm must help learners to understand the solution in a more
natural way.
Correctness: An algorithm must be in the correct manner.
Effectiveness: The steps of an algorithm must be valid and efficient.
Uniqueness: All steps of an algorithm should be clearly and uniquely defined, and the
result should be based on the given input.
Input: A good algorithm must accept at least one or more input.
Output: An algorithm must generate at least one output.
Procedure-
Given-
Starting coordinates = (X0, Y0)
Ending coordinates = (Xn, Yn)
The points generation using DDA Algorithm involves the following steps-
Step-01:
Calculate ΔX, ΔY and M from the given input.
These parameters are calculated as-
ΔX = Xn – X0
ΔY =Yn – Y0
M = ΔY / ΔX
Step-02:
Find the number of steps or points in between the starting and ending coordinates.
Step-03:
Suppose the current point is (Xp, Yp) and the next point is (Xp+1, Yp+1).
Find the next point by following the below three cases-
Step-04:
Keep repeating Step-03 until the end point is reached or the number of generated new points (including
the starting and ending points) equals to the steps count.
Problem-01:
Calculate the points between the starting point (5, 6) and ending point (8, 12).
Solution-
Given-
Step-01:
Step-02:
Step-03:
Problem-02:
Calculate the points between the starting point (5, 6) and ending point (13, 10).
Solution-
Given-
Starting coordinates = (X0, Y0) = (5, 6)
Ending coordinates = (Xn, Yn) = (13, 10)
Step-01:
Calculate ΔX, ΔY and M from the given input.
ΔX = Xn – X0 = 13 – 5 = 8
ΔY =Yn – Y0 = 10 – 6 = 4
M = ΔY / ΔX = 4 / 8 = 0.50
Step-02:
Calculate the number of steps.
As |ΔX| > |ΔY| = 8 > 4, so number of steps = ΔX = 8
Step-03:
As M < 1, so case-01 is satisfied.
Now, Step-03 is executed until Step-04 is satisfied.
Procedure-
Given-
Step-01:
Calculate ΔX and ΔY from the given input.
These parameters are calculated as-
ΔX = Xn – X0
ΔY =Yn – Y0
Step-02:
Calculate the decision parameter Pk.
It is calculated as-
Pk = 2ΔY – ΔX
Step-03:
Suppose the current point is (Xk, Yk) and the next point is (Xk+1, Yk+1).
Find the next point depending on the value of decision parameter Pk.
Follow the below two cases-
Step-04:
Keep repeating Step-03 until the end point is reached or number of iterations equals to (ΔX-1) times.
Problem-01:
Calculate the points between the starting coordinates (9, 18) and ending coordinates (14, 22).
Solution-
Given-
Starting coordinates = (X0, Y0) = (9, 18)
Ending coordinates = (Xn, Yn) = (14, 22)
Step-01:
Calculate ΔX and ΔY from the given input.
ΔX = Xn – X0 = 14 – 9 = 5
ΔY =Yn – Y0 = 22 – 18 = 4
Step-02:
Calculate the decision parameter.
Pk
= 2ΔY – ΔX
=2x4–5
=3
So, decision parameter Pk = 3
Step-03:
As Pk >= 0, so case-02 is satisfied.
Thus,
Similarly, Step-03 is executed until the end point is reached or number of iterations equals to 4 times.
(Number of iterations = ΔX – 1 = 5 – 1 = 4)
9 18
3 1 10 19
1 -1 11 20
-1 7 12 20
7 5 13 21
5 3 14 22
Problem-02:
Calculate the points between the starting coordinates (20, 10) and ending coordinates (30, 18).
Solution-
Given-
Step-01:
Calculate ΔX and ΔY from the given input.
ΔX = Xn – X0 = 30 – 20 = 10
ΔY =Yn – Y0 = 18 – 10 = 8
Step-02:
Calculate the decision parameter.
Pk
= 2ΔY – ΔX
= 2 x 8 – 10
=6
So, decision parameter Pk = 6
Step-03:
As Pk >= 0, so case-02 is satisfied.
Thus,
Pk+1 = Pk + 2ΔY – 2ΔX = 6 + (2 x 8) – (2 x 10) = 2
Xk+1 = Xk + 1 = 20 + 1 = 21
Yk+1 = Yk + 1 = 10 + 1 = 11
Similarly, Step-03 is executed until the end point is reached or number of iterations equals to 9 times.
(Number of iterations = ΔX – 1 = 10 – 1 = 9)
Pk Pk+1 Xk+1 Yk+1
20 10
6 2 21 11
2 -2 22 12
-2 14 23 12
14 10 24 13
10 6 25 14
6 2 26 15
2 -2 27 16
-2 14 28 16
14 10 29 17
10 6 30 18
Given-
Centre point of Circle = (X0, Y0)
Radius of Circle = R
The points generation using Mid Point Circle Drawing Algorithm involves the following steps-
Step-01:
X0 = 0
Y0 = R
Step-02:
Calculate the value of initial decision parameter P 0 as-
P0 = 1 – R
Step-03:
Suppose the current point is (Xk, Yk) and the next point is (Xk+1, Yk+1).
Find the next point of the first octant depending on the value of decision parameter P k.
Follow the below two cases-
Step-04:
If the given centre point (X0, Y0) is not (0, 0), then do the following and plot the point-
Xplot = Xc + X0
Yplot = Yc + Y0
Step-05:
Keep repeating Step-03 and Step-04 until Xplot >= Yplot.
Step-06:
Step-05 generates all the points for one octant.
To find the points for other seven octants, follow the eight symmetry property of circle.
This is depicted by the following figure-
Problem-01:
Given the centre point coordinates (0, 0) and radius as 10, generate all the points to form a circle.
Solution-
Given-
Centre Coordinates of Circle (X0, Y0) = (0, 0)
Radius of Circle = 10
Step-01:
Now, the points for rest of the part are generated by following the signs of other quadrants.
The other points can also be generated by calculating each octant separately.
Here, all the points have been generated with respect to quadrant-1-
Problem-02:
Given the centre point coordinates (4, -4) and radius as 10, generate all the points to form a circle.
Solution-
Given-
Xplot = Xc + X0 = 4 + X0
Yplot = Yc + Y0 = 4 + Y0
The following table shows the points for all the quadrants-
Quadrant-1 (X,Y) Quadrant-2 (-X,Y) Quadrant-3 (-X,-Y) Quadrant-4 (X,-Y)
(4, 14) (4, 14) (4, -6) (4, -6)
(5, 14) (3, 14) (3, -6) (5, -6)
(6, 14) (2, 14) (2, -6) (6, -6)
(7, 14) (1, 14) (1, -6) (7, -6)
(8, 13) (0, 13) (0, -5) (8, -5)
(9, 13) (-1, 13) (-1, -5) (9, -5)
(10, 12) (-2, 12) (-2, -4) (10, -4)
(12, 10) (-4, 10) (-4, -2) (12, -2)
(13, 9) (-5, 9) (-5, -1) (13, -1)
(13, 8) (-5, 8) (-5, 0) (13, 0)
(14, 7) (-6, 7) (-6, 1) (14, 1)
(14, 6) (-6, 6) (-6, 2) (14, 2)
(14, 5) (-6, 5) (-6, 3) (14, 3)
(14, 4) (-6, 4) (-6, 4) (14, 4)
These are all points of the Circle.
Given-
Centre point of Circle = (X0, Y0)
Radius of Circle = R
The points generation using Bresenham Circle Drawing Algorithm involves the following steps-
Step-01:
X0 = 0
Y0 = R
Step-02:
Step-03:
Suppose the current point is (Xk, Yk) and the next point is (Xk+1, Yk+1).
Find the next point of the first octant depending on the value of decision parameter P k.
Follow the below two cases-
Step-04:
If the given centre point (X0, Y0) is not (0, 0), then do the following and plot the point-
Xplot = Xc + X0
Yplot = Yc + Y0
Step-06:
Step-05 generates all the points for one octant.
To find the points for other seven octants, follow the eight symmetry property of circle.
This is depicted by the following figure-
Xk+1 = Xk + 1 = 0 + 1 = 1
Yk+1 = Yk = 8
Pk+1 = Pk + 4 x Xk+1 + 6 = -13 + (4 x 1) + 6 = -3
Step-04:
This step is not applicable here as the given centre point coordinates is (0, 0).
Step-05:
(0, 8)
-13 -3 (1, 8)
-3 11 (2, 8)
11 5 (3, 7)
5 7 (4, 6)
7 (5, 5)
Now, the points of octant-2 are obtained using the mirror effect by swapping X and Y coordinates.
(0, 8) (5, 5)
(1, 8) (6, 4)
(2, 8) (7, 3)
(3, 7) (8, 2)
(4, 6) (8, 1)
(5, 5) (8, 0)
Now, the points for rest of the part are generated by following the signs of other quadrants.
The other points can also be generated by calculating each octant separately.
Here, all the points have been generated with respect to quadrant-1-
Problem-02:
Given the centre point coordinates (10, 10) and radius as 10, generate all the points to form a circle.
Solution-
Given-
Centre Coordinates of Circle (X0, Y0) = (10, 10)
Radius of Circle = 10
Step-01:
X0 = 0
Y0 = R = 10
Step-02:
Step-03:
Thus,
Xk+1 = Xk + 1 = 0 + 1 = 1
Yk+1 = Yk = 10
Pk+1 = Pk + 4 x Xk+1 + 6 = -17 + (4 x 1) + 6 = -7
Step-04:
This step is applicable here as the given centre point coordinates is (10, 10).
Xplot = Xc + X0 = 1 + 10 = 11
Yplot = Yc + Y0 = 10 + 10 = 20
Step-05:
Step-03 and Step-04 are executed similarly until Xplot => Yplot as follows-
Now, the points for rest of the part are generated by following the signs of other quadrants.
The other points can also be generated by calculating each octant separately.
Here, all the points have been generated with respect to quadrant-1-
segments. Each line segment is drawn on the screen by directing the beam to move from
one point on the screen to the next, where its x & y coordinates define each point. After
drawing the picture. The system cycles back to the first line and design all the lines of the
image 30 to 60 time each second. The process is shown in fig:
Advantages:
1. A CRT has the electron beam directed only to the parts of the screen where an image is to be
drawn.
2. Produce smooth line drawings.
3. High Resolution
Disadvantages:
1. Random-Scan monitors cannot display realistic shades scenes.
Frame Buffer is also known as Raster or bit map. In Frame Buffer the positions are
called picture elements or pixels. Beam refreshing is of two types. First is horizontal
retracing and second is vertical retracing. When the beam starts from the top left corner
and reaches the bottom right scale, it will again return to the top left side called at
vertical retrace. Then it will again more horizontally from top to bottom call as
horizontal retracing shown in fig:
2. Non-Interlaced Scanning
In Interlaced scanning, each horizontal line of the screen is traced from top to bottom.
Due to which fading of display of object may occur. This problem can be solved by Non-
Interlaced scanning. In this first of all odd numbered lines are traced or visited by an
electron beam, then in the next circle, even number of lines are located.
For non-interlaced display refresh rate of 30 frames per second used. But it gives flickers.
For interlaced display refresh rate of 60 frames per second is used.
Advantages:
1. Realistic image
2. Million Different colors to be generated
3. Shadow Scenes are possible.
Disadvantages:
1. Low Resolution
2. Expensive
7. Beam Penetration technology come under it. 7. Shadow mark technology came under this.
Introduction
A frame buffer, a key intermediary between the digital world and what we see as visual output, is
a fundamental idea in computer graphics. An image's pixel data is effectively stored in a special
section of memory inside a computer or piece of graphics gear.
Consider your screen's pixels as tiny colored dots, and see the frame buffer as a painting. These
pixels together form the images and movements that we see on our monitors. The frame buffer,
however, contains crucial details about each pixel, including its color values, transparency, depth,
and other characteristics. It is not just a collection of colored dots.
The frame buffer serves as a space for staging images in the realm of graphics processing before
they are seen on the screen. The frame buffer's contents are modified by graphics processors and
software programs in concert to create complex visual scenes pixel by pixel. The contents of the
frame buffer are quickly sent to the display hardware after it has been fully updated, causing the
matching pixels on the screen to light up in the desired colors and patterns.
A frame buffer is made up of several essential parts that work together to produce and show
graphics. These elements consist of:
Pixel Array
The pixel array, a two-dimensional grid of memory cells that saves the color and other pertinent
data for each pixel in the image, is the essential component of a frame buffer. This array's row and
column arrangements match the screen's resolution.
Depth Buffer
Frame buffers frequently incorporate a depth buffer, sometimes known as a Z-buffer, to help render
three-dimensional scenes and mimic depth. Each pixel's depth is stored in this buffer, enabling
accurate occlusion and accurate scene representation.
Stencil Buffer
The stencil buffer helps define complicated forms by enabling programmers to design intricate
patterns and use a variety of effects during rendering.
Alpha Channel
Blending and transparency effects are managed via the alpha channel. When a pixel is displayed,
it describes how it should communicate with the pixels behind it.
The significance of frame buffers in computer graphics cannot be overstated. Between the
calculations performed by the graphics hardware and the user's final visual output, they serve as a
link.
Real-Time Rendering
Real-time rendering is made possible by frame buffers, which let the graphics hardware process
pixel input in parallel while also showing the current frame.
Double Buffering
Many systems use double buffering, where one frame buffer is actively used for rendering while
another is used for display, to prevent flickering and screen tearing. This method produces
seamless frame transitions.
Frame buffers make it possible to post-process effects like anti-aliasing, motion blur, and depth of
field. These enhancements improve the rendered scenes' overall visual appeal.
Interactive Graphics
For interactive graphics applications, like as simulations and video games, frame buffers are
essential. They provide a mechanism for the game's screen to be updated swiftly in response to
player input and changing game dynamics.
Multi-Processing Rendering
Rendering in many passes is frequently necessary for complex rendering techniques like
reflections and shadow mapping. The intermediate outcomes of each pass can be saved in frame
buffers and used in later passes.
Advancements
Frame buffers have developed in response to the need for increasingly realistic and immersive
graphical experiences as technology has advanced. Some significant developments include:
High-resolution displays
As 4K and even 8K displays have grown in popularity, frame buffers have needed to retain a lot
more pixel data, requiring additional memory and bandwidth.
Multi-Sample Anti-Aliasing
This technique was developed to stop images from having sharp edges. Frame buffers now allow
storing several samples per pixel to create smoother edges.
A more bright and realistic visual experience is made possible by frame buffers' adaptation to
handle high dynamic range (HDR) material and larger color gamuts.
Frame buffers are now essential for offering immersive experiences in virtual reality (VR) and
augmented reality (AR) settings, which call for low-latency rendering to avoid motion sickness.
Applications
Video Games
A key component of the gaming business is the frame buffer. They keep the pictures of the objects,
characters, and environments that make up the game. Flickering artifacts are frequently avoided
by using double buffering. Play is smooth and visually pleasing because the produced scene is
stored in the frame buffer before being switched to the display buffer.
Frame buffers are used to render each frame in computer-generated films and animations. They
help to produce realistic and visually beautiful images by storing the computed colors, textures,
and lighting effects.
Special Effects
For the creation of special effects like fire, explosions, and fluid simulations, frame buffers are
essential. Frame buffers make it easier to perform complicated calculations and several rendering
passes that are frequently needed for these effects.
Medical Imaging
In medical imaging systems, frame buffers are used to display diagnostic pictures from X-rays,
MRIs, and CT scans. They assist medical practitioners in diagnosis and treatment planning and
make it easier to visualize certain anatomical features.
Frame buffers are used by CAD applications to show and manipulate 3D models. These
technologies allow engineers and designers to construct and alter intricate designs while receiving
quick visual feedback.
In scientific simulations and visualizations, frame buffers are used to display complex data in a
way that is easy to see. This is essential in areas like fluid dynamics, forecasting the
Resolution
An image can be defined with the help of two-dimensional array specifically arranged
in rows and columns. In other words, we can say an image is like a file containing some
kind of visual information or data that can be displayed or rendered on some kind of
screen. A resolution is an important aspect of in digital image processing and computer.
In this article we will see resolution in detail.
Resolution
The word "resolution" may mean many things. It is used to describe the crispness and
clarity of the images seen on screens in the context of digital technology, which are
based on the number of pixels arranged both ways horizontally and vertically. Image
resolution, which expresses the amount of information in digital pictures and is
measured in the pixel per inch (PPI) or dot per inch (DPI), is essential for producing
high-quality prints and visual presentations.
Types of Resolution
Screen Resolution
The quantity of pixels (both horizontal and vertical) that are displayed on the digital
screens is known as the screen resolution. Image sharpness and visual quality are
determined by the common resolutions such as HD (1280x720), Full HD (1920x1080),
and the 4K (3840x2160), with greater resolutions providing more detailed and the
clearer visuals.
Image Resolution
Usually expressed in the pixels per inch (PPI) or dots per inch (DPI), image resolution
describes the sharpness or clarity of a picture. Larger file sizes are side effect of the
higher resolutions, which produce much clearer images. For high-quality printouts,
standard print resolutions are 300 DPI or much more .
Video Resolution
A video's pixel quality is always indicated by its resolution, which ranges between 720p
(1280x720) and 4K (3840x2160). Sharpness and detail in the videos are directly
impacted by the resolution, with a higher resolutions offering sharper and more detailed
images.
Print Resolution
The quality of the printed images is determined by print resolution, which is expressed
in dots per inch (DPI) or pixels per inch (PPI). Prints with the higher resolution will
have much more dots, or pixels, per inch, making them crisper and more detailed.
Although the ideal resolution can vary based on a type of printer and printing media,
300 DPI or greater is typically thought to be the benchmark for the high-quality prints.
Security Resolution
The ability of security systems and tools (such as IDS, IPS, and SIEM) to identify,
evaluate, and react to the threats or abnormalities within a network or system is referred
to as a security resolution in the cyber security. This include spotting potentially
harmful activity, unauthorized access attempts, unusual network traffic, and
vulnerabilities. An organization's entire cyber security posture improves when it can be
detect and respond to the security issues more efficiently, which is made possible by
higher security resolution.
Importance of Resolution
Resolution matters because it can make a big difference in the quality, clarity, and detail
of a lot of different elements of our lives. Several fundamental ideas emphasizing the
importance of resolution are as follows:
1. Picture Quality: Picture quality in graphic design, photography, and printing is
directly impacted by resolution. Professional-grade photographs, advertisements,
publications, and printed items require high-resolution images because they better
capture finer details, textures, and colors.
2. Digital Content Creation: In order to produce visually appealing and engaging
content, content creators such as designers, artists, filmmakers, and game developers