File tree 1 file changed +16
-0
lines changed
Graphics Algos/Car Animation
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change
1
+ The car.c file is a program which shows an animation of a moving car.
2
+ It has been drawn using the line function in the graphics library.
3
+
4
+ line(x1,y1,x2,y2)
5
+ where, x1,y1 ---- starting points of line
6
+ and x2,y2 ------- ending points of the line.
7
+
8
+ The animation takes place by the concept of translation.
9
+ We've put the car in a for loop incrementing the values of x co-ordinates of all the line functions by i
10
+
11
+ The final out put will look this way!
12
+
13
+ ![ screenshot from 2017-12-16 15-52-31] ( https://user-images.githubusercontent.com/26206171/34069730-d0f448d6-e27c-11e7-9a34-17603028a4ec.png )
14
+ ![ screenshot from 2017-12-16 15-52-35] ( https://user-images.githubusercontent.com/26206171/34069731-d5130948-e27c-11e7-882e-2d9ca7c00f0b.png )
15
+ ![ screenshot from 2017-12-16 15-52-37] ( https://user-images.githubusercontent.com/26206171/34069732-d5d02c76-e27c-11e7-99ba-7138d97e4877.png )
16
+ ![ screenshot from 2017-12-16 15-52-40] ( https://user-images.githubusercontent.com/26206171/34069733-d80b1ae6-e27c-11e7-96b5-715bf9601b95.png )
You can’t perform that action at this time.
0 commit comments