Computer Graphics
Computer Graphics
UNIT I:
Video Display Devices: Refresh Cathode Ray Tube, Raster Scan displays, Random Scan Displays,
Architecture of Raster and Random Scan Monitors, Color CRT-monitors, Color Generating Techniques
(Shadow Mask, Beam Penetration), Direct View Storage Tube, Flat Panel Displays.
Two dimensional Graphics Primitives: Points and Lines, Point plotting Techniques: Coordinate system,
Increment method, Line drawing algorithm: DDA, Bresenham’s line drawing, Bresenham‘s circle drawing
algorithm: Using polar coordinates, Midpoint circle drawing algorithms, Filled area algorithm: Scan line,
Polygon filling algorithms, Boundary filled algorithms.
UNIT II:
Two Dimensional Viewing: Viewing pipeline, Window to view port transformation, Window to view port
mapping.
UNIT III:
Computer Graphics: Computer graphics is simply the art/science of producing and manipulating
images on a computer. It is the use of computer to create, store, manipulate and interrogate and
present pictorial output. Tools used to make such pictures, software and hardware; input/output
devices are studied under computer graphics.
A frame buffer is a portion of RAM containing a bitmap that drives a video display. The
information in the buffer typically consists of color values for every pixel to be shown on the
display. Also called Refresh Buffer, contains picture definition. The image is stored in a frame
buffer containing the total screen area and where each memory location corresponds to a pixel.
Consider it as 2-D memory array. E.g. Frame buffer
1. size 8x8
2. Color depth 8 (values 0-7)
Uses large memory: 640x480 à 307200 bits à 38 kB
Working of CRT
Beam of electrons directed from cathode (-)to phosphor-coated (fluorescent) screen (anode (+))
Directed by magnetic focusing and deflection coils (anodes) in vacuum filled tube
Phosphor emits photon of light, when hit by an electron, of varied persistence (long 15-20 ms for
texts / short < 1ms for animation)
Refresh rate (50-60 Hz / 72-76 Hz) to avoid flicker / trail
Phosphors are organic compounds characterized by their persistence and their color (blue, red,
green).
Horizontal deflection and vertical deflection direct the electron beam to any point on the screen
Intensity knob: regulates the flow of electrons by controlling the voltage at the control grid (high
voltage reduces the electron density and thus brightness)
Accelerating voltage from positive coating inside screen (anode screen) or an accelerating anode
Image maintenance
Charge distribution to store picture information OR
Refresh CRT: refreshes the display constantly to maintain phosphor glow.
Focusing
Focusing forces the electron beam to converge to a point on the monitor screen
Can be electrostatic (lens) or magnetic (field)
Deflection
It directs the electron beam horizontally and/or vertically to any point on the screen
Can be controlled by electric (deflection plates, slide 9) or magnetic fields (deflection coils, slide 5)
Magnetic coils: two pairs (top/bottom, left/right) of tube neck
Electric plates: two pairs (horizontal, vertical)
Characteristics of Cathode-Ray Tube (CRT)
Intensity is proportional to the number of electrons repelled in beam per second (brightness)
Resolution is the maximum number of points that can be displayed without overlap; is expressed as
number of horizontal points by number of vertical points; points are called pixels (picture elements);
example: resolution 1024 x 768 pixels. Typical resolution is 1280 x 1024 pixels.
High-definition systems: high resolution systems.
Persistence is defined as the time taken by the emitted light to decay one tenth of its original
intensity.
Max persistence 1 Sec, Min Persistence 10-60 m sec
Higher persistence ~ Low refresh rate ~ complex images
Lower persistence ~ High refresh rate ~ Animations
Refresh Rate (Hz): number of times screen drawn or refreshed per second.
Usually 60 Hz (Why)
Depends upon persistence
Pixel Picture Element
Mapping of phosphorus element to pixel
Bit for monochrome
Byte for 256 color levels
3 Bytes to produce more than 16.7 million colors
Refresh Procedure
Retracing
Horizontal retrace – beam returns to left of screen
Vertical retrace – bean returns to top left corner of screen
Blanking
Horizontal Retrace Blanking
Vertical Retrace Blanking
Interlacing
display first even-numbered lines, then odd-numbered lines
permits to see the image in half the time
Useful for slow refresh rates (30 Hz shows as 60 Hz).
Over scanning
Scan lines extended beyond visibility edge as there is limit on speed of sweep generator
Avoid cracking at borders and distortion
Top and Bottom Vertical Over scanning
Left and Right Horizontal Over scanning
Refresh rate
24 is a minimum to avoid flicker, corresponding to 24 Hz (1 Hz = 1 refresh per second)
Current raster-scan displays have a refresh rate of at least 60 frames (60 Hz) per second, up to 120
(120 Hz).
Advantages:
Good quality lines
No need of scan conversion
Easy animation and requires little memory
Disadvantages:
Requires intelligent electron beam (processor controlled)
Limited screen density, limited to simple, line-based images
Limited color capability.
RASTER RANDOM
DISPLAY MECHANISM E-beam traces entire screen from E-beam can highlight random
upper left corner to bottom right positions on the screen
Components
- Flooding Gun to flood the entire screen and charge the collector plate
- Writing Gun is same as e-gun in CRT having heating filament, cathode, focusing anode and
deflection yokes
- Collector Plate partly energized by the flooding gun, has background charge to keep fired
phosphorus illuminated
- Phosphorus Screen higher persistence CRT screen
- Ground to discharge the collector to erase the screen
Advantages/Disadvantages
– No Refreshing required
– It can draw complex images with higher resolution
– Does not display colors
– Selected part of the picture cannot be erased
– Animation not supported
Flat Panel Displays:
Introduction
- Flat panel displays are video devices that are thinner, lighter, and require less power than CRT’s.
- Examples: wall frames, pocket notepads, laptop computer screens …
Types of Flat Panel Displays
- Emissive panels convert electrical energy into light:
plasma panels, thin-film electroluminescent display device, light-emitting diodes.
- Non-emissive convert light into graphics using optical effects:
liquid-crystal device (LCD).
Plasma-panel display:
Thin-film electroluminescent displays are similar devices except that the region between the plates is filled
with phosphor instead of gas. Example: zinc sulphide with manganese
voltage applied between the plates moves electrons to the manganese atoms that release photons of light.
Light-emitting diode:
– a matrix of diodes, one per pixel
– apply voltage stored in the refresh buffer
– Convert voltage to produce light in the display.
Liquid-crystal displays (LCD):
- LCD screens are often used in small devices such as calculators and laptop monitors.
- non-emissive types of displays
- the picture produced by passing light from a light source through liquid-crystal material
- Liquid-crystal material contains crystals within a liquid nematic (thread-like) liquid-crystals have rod
shape that can either align to with the light direction or not
when voltage is applied to conductors.
- Liquid-crystal material can be programmed to either let the light through or not
Yend – Ystart
m=
Xend – Xstart
b is the y-intercept. Recall that the y-intercept is the line’s y value when x equals zero.
For example, the line defined by equation y=5x+3 the y-intercept is b=3.
The y-intercept can be calculated by the following equation in terms of the coordinate of the starting points.
b = Ystart – m Xstart
The y-intercept can also be calculated by the following equation in terms of the coordinate of the ending
points.
b = Yend – m Xend
The slope of a line (m) is defined by its start and end coordinates. The diagram below shows some examples
of lines and their slopes, in all cases b=0.
Yend – Ystart
m=
Xend – Xstart