A blog for C programs, notes and articles about C, the programming language.
Search This Blog
Rotation of Wheel - C Program for Computer Graphics Lab
In computer graphics experiments, we need to rotate objects like wheels while doing animation. This is a simple c program that shows rotation of a wheel. A circle is drawn and four radial lines are drawn at 90 degree separation. These lines are drawn from center to a point on circle which depends on the value of theta, a variable. As the value of theta changes, the end points of the radial lines changes. Therefore, increasing the value of theta in a loop give counter clockwise rotaion and decreasing gives clockwise rotation.
No comments:
Post a Comment