![]() |
VOOZH | about |
In computer graphic, C++ provide graphic.h through which objects can be created and by using this objects flying bird can be created in C++ program.
Functions used in this program are as follows:
line(x1, y1, x2, y2);
where, (x1, y1) (x2, y2) are end points of the line.
arc(x, y, start_angle, end_angle, r);
where, (x, y) are centre of the arc, start_angle is the starting angle, end_angle is the ending angle and r is the radius of angle.
circle(x, y, r);
where, (x, y) is the centre points and r is the radius of the circle.
delay(n);
where, n is number of seconds you want to stop the screen.
Below is the C++ program implementing flying bird using graphics.h:
Output: