Professional Documents
Culture Documents
CG File
CG File
Drawing objects like circles, rectangles, polygons etc using the graphic function
CIRCLE CODE
OUTPUT
pg. 1
RECTANGLE CODE
OUTPUT
pg. 2
SQUARE CODE
OUTPUT
pg. 3
2. Graphics Inbuilt functions
1) Line function()
CODE:
OUTPUT
pg. 4
2) Bar function()
CODE:
OUTPUT
pg. 5
3. Line Drawing Algorithms (DDA & Bresenham’s Algorithm)
pg. 6
OUTPUT
pg. 7
DDA CODE:
OUTPUT
pg. 8
4. Write to implement Circle Algorithms.
pg. 9
OUTPUT
pg. 10
OUTPUT
pg. 11
5. Write to implement Translation in 2D.
Translation in 2D CODE
OUTPUT
pg. 12
6. Write to implement Rotation in 2D
Rotation in 2D CODE
pg. 13
OUTPUT
pg. 14
7. Write to implement Scaling in 2D
scaling in 2D CODE
OUTPUT
pg. 15
8. Write to implement Reflection in 2D
Reflection in 2D CODE
pg. 16
OUTPUT
pg. 17
9. Write to implement Shearing in 2D
Shearing in 2D CODE
OUTPUT
pg. 18
10. Write to implement Cohen Sutherland Algorithm
pg. 19
pg. 20
OUTPUT
pg. 21
11. moving cycle.
OUTPUT
pg. 22
12. Draw a Show Moving Car Animation
pg. 23
OUTPU
pg. 24
13. Write to Making an Analog Clock
pg. 25
OUTPUT
pg. 26
14. Write to Show Bouncing Ball Animation
pg. 27
OUTPUT
pg. 28
11. Program to rotate a circle outside another circle.
CODE:
OUTPUT
pg. 29