Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
COMPUTER GRAPHICS
Practical File
Submitted by: [Your Name]
Roll No: [Your Roll No]
Course: BCA
College: [Your College Name]
Page 1
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
Table of Contents
1. Program to Draw Line
2. Program to Draw Circle
3. Program to Draw Rectangle
4. Program to Implement Flood Fill
5. Program to Draw Ellipse
6. Program to Implement 2-D Mirror Reflection
7. Program to Draw a Smile
8. Program to Implement 2-D Shearing
9. Program to Draw Circle using Bresenham's Algorithm
10. Program to Implement 2-D Translation
Page 2
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
1. Program to Draw Line
Explanation: Uses line() function to draw a straight line between two points.
Program Code: [Refer to practical file or attach code snippet here]
Page 3
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
2. Program to Draw Circle
Explanation: Uses circle() function to draw a circle with a given center and radius.
Program Code: [Refer to practical file or attach code snippet here]
Page 4
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
3. Program to Draw Rectangle
Explanation: Uses rectangle() function to draw a rectangle with given corners.
Program Code: [Refer to practical file or attach code snippet here]
Page 5
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
4. Program to Implement Flood Fill
Explanation: Implements a recursive flood fill algorithm to fill a closed figure with a color.
Program Code: [Refer to practical file or attach code snippet here]
Page 6
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
5. Program to Draw Ellipse
Explanation: Uses ellipse() function to draw an ellipse by specifying axes and angles.
Program Code: [Refer to practical file or attach code snippet here]
Page 7
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
6. Program to Implement 2-D Mirror Reflection
Explanation: Reflects a line across the x-axis to demonstrate mirror reflection.
Program Code: [Refer to practical file or attach code snippet here]
Page 8
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
7. Program to Draw a Smile
Explanation: Combines circles and an arc to create a simple smiling face.
Program Code: [Refer to practical file or attach code snippet here]
Page 9
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
8. Program to Implement 2-D Shearing
Explanation: Demonstrates horizontal shearing transformation on a square.
Program Code: [Refer to practical file or attach code snippet here]
Page 10
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
9. Program to Draw Circle using Bresenham's Algorithm
Explanation: Implements Bresenham's circle drawing algorithm using integer arithmetic.
Program Code: [Refer to practical file or attach code snippet here]
Page 11
Computer Graphics Practical File
Subject Code: [Your Subject Code] Semester: [Your Semester]
10. Program to Implement 2-D Translation
Explanation: Translates (moves) a rectangle by adding translation distances to its coordinates.
Program Code: [Refer to practical file or attach code snippet here]
Page 12