Paper-1 CG
Paper-1 CG
PART A
Q1(A): Bresenham’s Line Drawing Algorithm
• Δy = y_2 - y_1 = 4 - 0 = 4
Given:
• Resolution: 640 \times 480 pixels
• Refresh rate: 60 frames per second
PART B
Q2(A): Transformation of Square
Original Coordinates:
• A(0,0), B(0,4), C(4,4), D(4,0) .
Steps:
1. Translate Square to Origin: Subtract center (2,2) .
PART C
Q2(B): Cohen-Sutherland Line Clipping Algorithm
Limitations:
• Works only for rectangular windows.
• Cannot handle curved or irregular clipping regions.
PART C
Q3(A): Bezier Curve
Substitute :
Simplify each term:
•
•
•
•
Given: Points: .
Here:
•
•
•
• .
PART D
Q4(A): Lossy and Lossless Compression
Aspect Lossy Compression Lossless Compression
Definition Reduces file size by removing data. Reduces file size without data loss.
Example JPEG (images), MP3 (audio). PNG (images), ZIP files.
Algorithm Irreversible (e.g., Huffman Coding). Reversible (e.g., Run Length Encoding).
Example Algorithm:
• Huffman Coding uses variable-length codes to compress data
efficiently.
Methods:
• Assemble text, images, audio, video, and animations.
• Create interactive presentations or applications.
Steps:
1. Motion Compensation: Predict frames based on previous
ones.
2. Quantization: Reduce redundant data.
3. Compression: Apply techniques like DCT (Discrete Cosine
Transform).