Computer GraphicsUnit 110 min read
Computer Graphics Basics: Definitions, Systems, Applications & Display Architectures
Unit 1 of Computer Graphics introduces core concepts like definitions, applications across industries, and compares vector vs. raster display architectures with their block diagrams, advantages, and limitations—essential for TU exams and real-world graphics systems.
TAKEAWAYS:
- Computer graphics is the study of modeling, rendering, and displaying 2D/3D visual content using computers, combining math, algorithms, and hardware.
- It is classified into raster (pixel-based) and vector (geometric primitive-based) systems, each with distinct architectures, trade-offs, and use cases.
- Applications span gaming, animation, medical imaging, CAD, and UI design, with Nepalese examples like eSewa’s icons (vector) and NTC’s traffic simulations (raster).
- The block diagram of display systems reveals how components (CPU, GPU, memory, display) interact to generate images.
- Aliasing, resolution, and refresh rate are critical factors in display quality, directly impacting user experience.
- Understanding historical milestones (e.g., WhatsApp’s emoji evolution) and future trends (VR/AR) helps contextualize the field’s growth.
1. What is Computer Graphics?
Computer graphics (CG) is the art and science of creating, manipulating, and displaying visual content using computers. It blends:
- Mathematics (geometry, transformations, lighting).
- Algorithms (rendering, clipping, shading).
- Hardware (GPUs, displays, input devices).
Key Definitions
| Term | Definition |
|---|---|
| Modeling | Creating digital representations of objects (e.g., 3D models of buildings in Pathao’s maps). |
| Rendering | Converting models into 2D images (e.g., Daraz’s product thumbnails). |
| Display | Showing rendered images on screens (e.g., Ncell’s mobile displays). |
| Animation | Simulating motion (e.g., eSewa’s loading spinners). |
| Simulation | Mimicking real-world processes (e.g., NTC’s traffic flow models). |
2. Applications of Computer Graphics
CG is ubiquitous in Nepal and globally, transforming industries:
In Nepal
eSewa/Khalti
- Use: Vector graphics for icons, buttons, and UI elements (scalable without pixelation).
- Why? Ensures crisp displays on all devices (from feature phones to desktops).
- Example: The "Pay Now" button uses a scalable SVG vector to avoid blurriness.
NTC (Nepal Telecommunications Corporation)
- Use: Raster graphics for real-time traffic simulations (e.g., Kathmandu’s busy intersections).
- Why? High-resolution pixel maps accurately model road networks and vehicle flows.
- Example: Their digital traffic management system uses raster-based heatmaps to predict congestion.
Nepal Stock Exchange (NEPSE)
- Use: 3D data visualization for stock trends (e.g., animated graphs of share prices).
- Why? Helps traders spot patterns faster than static charts.
Globally
Google Maps
- Use: Vector tiles for dynamic map rendering (zooming without preloading all data).
- How? Roads, landmarks, and POIs are stored as geometric vectors, rendered on demand.
WhatsApp/YouTube
- Use: Raster compression (e.g., WebP format) for fast image/video sharing.
- Why? Reduces bandwidth while maintaining quality.
Medical Imaging (e.g., MRI Scans)
- Use: Volume rendering to visualize internal structures in 3D.
- Example: Doctors use rasterized cross-sections to diagnose tumors.
3. Display Systems: Vector vs. Raster Architectures
The display architecture determines how images are generated and stored. The two primary types are:
A. Raster Graphics (Bitmap)
- Definition: Images are represented as a grid of pixels (picture elements), each with a color value.
- Block Diagram:
flowchart TD A["CPU"] --> B["Frame Buffer (RAM)"] B --> C["Pixel Grid (Width × Height × Color Depth)"] C --> D["Display Controller"] D --> E["Monitor (Resolution: W × H)"]
- Advantages:
- Photorealistic (ideal for photos, complex textures).
- Hardware-efficient for real-time rendering (e.g., games, videos).
- Disadvantages:
- Resolution-dependent (scaling causes pixelation).
- Large file sizes (e.g., a 4K image requires 8M pixels).
- Real-World Use:
- Photos on social media (Instagram, Facebook).
- Medical imaging (X-rays, MRIs).
B. Vector Graphics
- Definition: Images are defined by mathematical equations (lines, curves, shapes) stored as paths.
- Block Diagram:
flowchart TD A["CPU"] --> B["Geometric Primitives (Points, Lines, Curves, Shapes)"] B --> C["Rasterization Engine (Converts to Pixel Data)"] C --> D["Frame Buffer (Temporary Storage)"] D --> E["Display (Vector → Raster Output)"]
- Advantages:
- Scalable (no quality loss when resized).
- Small file sizes (e.g., a logo can be a few KB).
- Disadvantages:
- Not ideal for photos (aliasing on curves).
- Complex rendering (requires more CPU/GPU power).
- Real-World Use:
- Logos (e.g., Ncell’s logo).
- Animations (e.g., YouTube’s animated thumbnails).
Comparison Table
| Feature | Raster Graphics | Vector Graphics |
|---|---|---|
| Representation | Pixel grid | Mathematical paths |
| Scalability | Poor (pixelation) | Excellent (infinite zoom) |
| File Size | Large (e.g., 4K photos) | Small (e.g., SVG logos) |
| Best For | Photos, real-time graphics | Logos, UI elements, animations |
| Hardware | Optimized for GPUs (parallel processing) | CPU-intensive (path calculations) |
| Example in Nepal | NTC traffic simulations | eSewa/Khalti icons |
4. Key Concepts in Display Systems
A. Resolution and Refresh Rate
- Resolution: Number of pixels (e.g., 1920×1080 for Full HD).
- Higher resolution = sharper images but larger file sizes.
- Refresh Rate: How often the screen updates per second (e.g., 60Hz, 144Hz).
- Higher refresh rate = smoother motion (critical for gaming).
Worked Example: Choosing a Display for a Bank’s ATM
- Requirement: Clear text and images for security codes.
- Options:
- Raster: 1920×1080 at 60Hz (good for photos but may pixelate at zoom).
- Vector: Scalable UI elements (better for text buttons).
- Solution: Use a hybrid approach:
- Background: Raster (for photorealistic ads).
- Text/Buttons: Vector (for crisp scaling).
B. Aliasing and Anti-Aliasing
- Aliasing: "Staircase" effect on diagonal lines/curves due to pixelation.
graph LR A["High-Resolution Line"] --> B["Aliased\n(Staircase)"] A --> C["Anti-Aliased\n(Smoothed)"]
- Anti-Aliasing: Softens edges by blending colors.
- Example: Pathao’s app uses anti-aliasing for smooth ride directions.
C. Color Models
- RGB: Used in displays (Red, Green, Blue light mixing).
- CMYK: Used in printing (Cyan, Magenta, Yellow, Key/Black ink).
- Worked Example: Printing a Bank’s Logo
- Digital (Screen): RGB (255, 0, 0) for red.
- Print (Paper): CMYK (~0% C, 100% M, 100% Y, 0% K).
5. Historical Evolution and Future Trends
Milestones
- 1960s: First vector displays (e.g., Sketchpad by Ivan Sutherland).
- 1980s: Raster graphics dominate (e.g., Pac-Man on arcades).
- 1990s: 3D acceleration (e.g., Quake’s GPU rendering).
- 2000s: Web graphics (SVG, WebGL).
- 2020s: VR/AR (e.g., Meta Quest, Pokémon GO).
Future Trends in Nepal
- Digital Payments (eSewa/Khalti): More interactive 3D animations for security features.
- Smart Cities (Kathmandu): Real-time raster simulations for traffic and air quality.
- E-Learning: 3D virtual labs (e.g., TU’s online courses using CG for experiments).
6. Worked Example: Designing a UI for a Nepalese App
Scenario: Pathao wants to redesign its driver app with better graphics.
Step 1: Choose Display Type
- Problem: Current UI has blurry icons on low-resolution phones.
- Solution: Replace raster icons with SVG vectors.
Step 2: Optimize for Performance
- Raster: 100 icons × 100KB each = 10MB (slow load).
- Vector: 100 icons × 5KB each = 500KB (faster load).
Step 3: Add Anti-Aliasing
- Before: Jagged edges on ride direction arrows.
- After: Smoothed curves for better readability.
Result: Faster load times and sharper display on all devices.
Exam Tip
- Block Diagrams: Always draw vector vs. raster architectures with labeled components (CPU, frame buffer, display controller). Mark 3 differences in your answer.
- Applications: Link concepts to Nepalese examples (e.g., "eSewa uses vector graphics for scalable icons").
- Definitions: Memorize key terms (modeling, rendering, aliasing) and their one-sentence definitions.
- Comparison Tables: Use tables to contrast raster vs. vector (resolution, scalability, use cases).
- Real-World Tie-Ins: In exams, relate questions to apps/companies (e.g., "NTC’s traffic system uses raster graphics because...").
- Short Notes: For "discuss applications," list 3 industries + 1 Nepalese example (e.g., gaming, medical, e-commerce, NEPSE).
Pro Tip: Practice sketching block diagrams from memory—examiners love clear, labeled visuals!
Based on the TU BIT syllabus for Computer Graphics (BIT304), unit 1.
Discussion
Loading…