SS JAIN SUBODH PG COLLEGE JAIPUR
COMPUTER GRAPHICS
1. Definition of Computer Graphics
Computer Graphics is the field of visual computing where computers are used to generate,
manipulate, and represent images or visual content. It combines mathematics, programming, and
hardware technologies.
2. Application Areas of Computer Graphics
Entertainment: Movies, video games, animations.
Design: CAD (Computer-Aided Design) for engineering and architecture.
Education and Training: Simulations for teaching (e.g., medical or flight simulators).
Data Visualization: Scientific data representation, charts, and graphs.
Virtual Reality (VR): Immersive environments for training, games, and research.
Image Processing: Enhancing and analyzing images.
3. Graphical User Interface (GUI)
A GUI allows users to interact with software using graphical elements like windows, buttons,
icons, and menus, as opposed to text-based interfaces. Examples: Operating systems (Windows,
macOS).
4. Cathode Ray Tubes (CRT)
An early display device based on electron beams hitting phosphor-coated screens.
Advantages: High refresh rate, good contrast.
Disadvantages: Bulky, consumes more power.
5. Random Scan Displays
Also called vector displays.
Draws images directly using line segments.
Used in CAD systems for precision.
Advantages: High resolution for line-based drawings.
Disadvantages: Cannot display realistic images easily.
6. Raster Scan Displays
Most common display type.
Displays images as a grid of pixels scanned row by row.
Used in TVs, monitors.
Advantages: Supports realistic image rendering.
Disadvantages: Lower precision for lines and curves compared to random scan.
7. Color CRT Monitors
Utilizes three electron guns (red, green, and blue) to create colors.
Uses shadow masks to align beams with phosphor dots.
8. Flat Panel Displays
Plasma Panels
Uses ionized gas to create light.
Advantages: Good contrast, large sizes available.
Disadvantages: Consumes more power.
Liquid Crystal Displays (LCDs)
Uses liquid crystals and polarized light.
Advantages: Lightweight, energy-efficient.
Disadvantages: Limited viewing angles.
Electroluminescent Displays
Emits light when an electric current passes through.
Advantages: Thin, flexible.
Disadvantages: Expensive, lower brightness.
9. Graphics Software
GKS (Graphical Kernel System)
Standard for 2D graphics programming.
Includes functions for drawing, transformations, and interactions.
PHIGS (Programmer's Hierarchical Interactive Graphics System)
Standard for 3D graphics.
Allows creating hierarchical models and interactions.
10. Color Models
RGB (Red, Green, Blue)
Additive model used in screens and cameras.
Combines red, green, and blue light to produce colors.
CMYK (Cyan, Magenta, Yellow, Black)
Subtractive model used in printing.
Combines ink colors to absorb light.
HSV (Hue, Saturation, Value)
Represents colors based on human perception.
Used in graphic design tools.
11. Color Lookup Table (CLUT)
Stores a palette of colors for efficient rendering.
Reduces memory requirements by referencing indexed colors
Unit 2: Raster Graphics Algorithms
1. Line Drawing Algorithms
DDA Algorithm:
o Line ka ek starting aur ending point hota hai.
o Slope (mmm) calculate karte hain aur point-by-point line draw karte hain.
o Computer x aur y ke values increment karke pixels draw karta hai.
Bresenham's Algorithm:
o Yeh line draw karne ka fast method hai.
o Sirf numbers (integers) use karta hai, isliye jaldi kaam karta hai.
o Yeh har step pe decide karta hai ki agla point diagonal hoga ya sidha.
2. Circle Aur Ellipse Drawing Algorithms
Circle Drawing:
o Circle ke ek quadrant ke points calculate karo aur baaki quadrants mein mirror kar do.
o Computer ko decide karna hota hai ki agla point horizontally hoga ya diagonally.
Ellipse Drawing:
o Circle ke method ka extended version hai.
o Major aur minor axes ka use karke ellipse ke points calculate karte hain.
3. Filling Algorithms (Andar Color Bharaana)
Boundary Fill:
o Color ek point (seed) se bharna shuru karte hain jab tak boundary milti hai.
Flood Fill:
o Same logic boundary fill jaisa, bas yeh andar ka color dekhkar fill karta hai.
Scan-Line Fill:
o Har ek horizontal line (row) pe pixels fill karte hain.
4. Transformations (Shape Ko Modify Karna)
Translation: Shape ko ek jagah se doosri jagah move karte hain (shift karte hain).
Rotation: Shape ko ek point ke around ghoomate hain.
Scaling: Shape ko bada ya chhota karte hain.
Reflection: Shape ka mirror image banate hain.
Shearing: Shape ko ek taraf tilt karte hain.
Homogeneous Coordinates: Ek special system hai jisme saari transformations ek matrix se
solve ho jaati hain.
Unit 3: Clipping Aur Surface Detection
1. Clipping (Screen Ke Bahar Ka Part Hataana)
Window Aur Viewport:
o Window: Screen ka woh part jo aap dekhna chahte ho.
o Viewport: Us window ko display ke kis part mein dikhana hai.
Sutherland-Cohen Clipping:
o Line ke endpoints ke region codes banate hain.
o Jo parts window ke andar hain, sirf unhe dikhate hain.
Cyrus-Beck Algorithm:
o Complex shapes ke liye line ko clip karta hai.
2. Visible Surface Detection (Jo Part Dikhe, Sirf Wahi Show Karo)
Backface Algorithm:
o Jo shapes camera ke opposite direction mein hain, unhe hide karte hain.
Depth Sorting:
o Shapes ko depth (distance) ke basis pe sort karte hain aur near objects show karte hain.
Area Subdivision:
o Screen ko chhote parts mein todte hain aur har part mein check karte hain ki kaunsa
object dikhega.
UNIT = 4
1. DIP kya hai?
Images ko computer ke through better banana ya unka analysis karna.
2. Kahaan Use Hota Hai?
Doctors ke liye: X-ray aur scan dekhne ke liye.
Satellite images: Maps aur weather dekhne ke liye.
Security: Face aur fingerprint ka pata lagane ke liye.
Photos aur Videos: Editing aur effects ke liye.
3. Image Ke Formats
JPEG: Normal photos ke liye.
PNG: Photos jisme background transparent ho.
GIF: Moving pictures (chhoti animations).
BMP: High-quality images ke liye.
4. Image Ko Improve Karne Ke Tarike
Antialiasing: Image ke tootey (zigzag) edges ko smooth banana.
Convolution: Image ko blur ya sharp banana.
Thresholding: Image ko black-and-white me badalna.
Enhancement: Image ka brightness aur clarity badhana.