UNIT 1: Overview of Graphics System
Video Display Devices
Devices used to present graphical output visually:
• Cathode Ray Tube (CRT):
o Raster-scan systems: Refresh screen line by line from top to
bottom. Commonly used in TVs and computer monitors. Best
for realistic images and video.
o Random-scan systems (Vector displays): Draws images
using a sequence of lines (vectors). Well-suited for line art,
engineering, and scientific applications.
• Flat-Panel Displays:
o LCD (Liquid Crystal Display): Uses liquid crystals
controlled by electric signals and backlighting. Offers sharp
images, widely used in monitors and laptops.
o LED: Enhanced version of LCD that uses LED backlighting for
better brightness, energy efficiency, and color contrast.
o Plasma Displays: Use small cells containing electrically
charged ionized gases. Suitable for large screens with wide
viewing angles.
o OLED (Organic LED): Each pixel emits its own light.
Delivers deep blacks, high contrast, and faster response time.
Used in high-end smartphones and TVs.
Input Devices
Used to interact with or provide input to graphics applications:
• Keyboard and Mouse: Standard devices for textual and point-
based input.
• Light Pen: Hand-held device that detects screen position when
pointed at CRT displays.
• Joystick/Trackball: Control cursor by motion; used in simulation
and gaming.
• Digitizer: Converts analog drawings/sketches into digital form.
Used in CAD.
• Touch Screens: Allow direct interaction with graphical interface
using fingers/stylus.
• Scanner: Converts printed documents/images into digital format.
Hardcopy Devices
Used to produce physical copies of graphical output:
• Printers:
o Inkjet: Sprays ink to form images. Suitable for colorful image
output.
o Laser: Uses laser beams to produce high-resolution prints
quickly.
• Plotters: Use pens to draw vector graphics on paper. Suitable for
detailed diagrams like maps, architectural drawings.
Graphics Software
• Drivers & APIs (Application Programming Interfaces):
o Provide interface between hardware and software for rendering
graphics.
o Examples: OpenGL (cross-platform), DirectX (Windows-
specific).
• GUI Toolkits:
o Libraries like GLUT, Qt, GTK+ used to build graphical
interfaces with windowing, buttons, and event handling.
Output Primitives
Points and Lines
• Point: Basic geometric primitive represented by coordinates (x, y).
• Line: Defined by start and end points. Requires interpolation to
determine which pixels to illuminate.
Line Drawing Algorithms
• DDA (Digital Differential Analyzer):
o Uses incremental calculations to interpolate points between
endpoints.
o Involves floating-point operations. Easier to implement but
slower.
• Bresenham’s Line Algorithm:
o Uses only integer calculations to determine closest pixel.
o More efficient than DDA. Handles all slopes and octants using
decision variables.
Circle Drawing
• Midpoint Circle Algorithm:
o Draws circle using symmetry about center (8-way).
o Uses decision parameters to choose nearest pixel.
o Efficient due to use of integer arithmetic.
Filled Area Primitives
• Scan-line Fill: Fills polygons by drawing horizontal lines between
edges.
• Boundary Fill: Fills area until boundary color is reached.
• Flood Fill: Fills connected region of a specific color. Good for filling
enclosed areas.
UNIT 2: Attributes & 2D Transformations
Attributes of Output Primitives
Defines appearance:
• Line Attributes: Color, width, and styles (solid, dashed, dotted).
• Curve and Character Attributes: Font, size, orientation, and
color.
2D Transformations
Geometric manipulations to alter object position/shape:
• Translation:
o Moves an object by adding offsets.
o Equations:
• Scaling:
o Resizes object. Can be uniform or differential.
o Equations:
• Rotation:
o Rotates about origin by angle θ.
o Equations:
▪
▪
Matrix Representation
• All transformations represented using 3×3 matrices.
• Allows easy combination using matrix multiplication.
Homogeneous Coordinates
• Adds a third coordinate (w = 1) to allow translations.
• Facilitates concatenation of transformations.
Composite Transformations
• Combines multiple transformations in a sequence.
• Order matters: Different order leads to different results.
• Reflection: Mirror image across axis.
• Shear: Slanting transformation along axis.
UNIT 3: Viewing and Clipping
Viewing Pipeline
Sequence for converting 3D world to 2D image:
1. Modeling Transformation
2. Viewing Transformation
3. Projection
4. Clipping
5. Viewport Transformation
Viewing Coordinate Frame
• World coordinates are transformed to camera/viewing coordinates.
• Camera's position and direction define the frame.
Window to Viewport Transformation
• Maps a selected area (window) of world coordinates to a display
region (viewport).
• Maintains geometric properties.
• Equations:
Clipping
Removing objects or parts outside view window:
• Point Clipping: Checks if point lies within window.
• Line Clipping:
o Cohen-Sutherland: Assigns region codes. Efficient for trivial
accept/reject.
o Liang-Barsky: Uses parameterized line equations. Faster than
Cohen-Sutherland.
• Polygon Clipping:
o Sutherland-Hodgman Algorithm: Clips each polygon edge
with respect to window. Works well for convex polygons.
UNIT 4: Input and 3D Transformations
Graphical Input Functions
Used for interactive graphics systems:
• Locator: Returns screen coordinates.
• Pick: Identifies and selects objects.
• Choice: Selects from menu options.
• String: Allows text entry.
• Stroke: Records freehand input (pen movement).
• Valuator: Measures continuous input like sliders.
3D Input Devices
Specialized devices for interacting with 3D content:
• 3D Mouse: Allows movement in all three dimensions.
• Data Gloves: Capture finger and hand motion for VR/AR.
• 3D Scanners: Convert real-world objects into 3D models.
3D Transformations (Homogeneous Coordinates)
Represented using 4×4 matrices:
• Translation:
• Scaling:
• Rotation:
o About X-axis:
o Similar equations for Y and Z axes.
• Composite Transformation: Combine translation, scaling, and
rotation using matrix multiplication.
UNIT 5: Projection, Visibility & Color Models
Viewing Pipeline
Transforms 3D models to 2D images through these stages:
• Modeling → Viewing → Projection → Clipping → Viewport Mapping.
Projections
• Orthographic Projection:
o Projects along parallel lines.
o Preserves object size and shape. Ideal for engineering drawings.
• Perspective Projection:
o Projects along converging lines to a viewpoint.
o Simulates human vision. Distant objects appear smaller.
Visible Surface Detection Methods
• Backface Detection:
o Uses surface normals. If polygon faces away, it's not drawn.
o Improves rendering speed.
• Depth Buffer Method (Z-buffer):
o Stores depth of each pixel.
o Compares new pixel's depth with stored value. Closer one is
drawn.
o Simple and widely used in hardware.
Color Models & Color Applications
Defines how colors are represented:
• RGB (Red, Green, Blue):
o Additive model for screens.
o Mixing produces all visible colors.
• YIQ:
o Used in TV broadcasting.
o Y = Luminance (brightness), I & Q = Chrominance (color info).
• CMY (Cyan, Magenta, Yellow):
o Subtractive model for printers.
o Inks subtract light to produce colors.
• HSC (Hue, Saturation, Color Value):
o Based on human perception.
o Useful in color selection, image editing.