C program to create a Rocket using Graphics
In this article, we will discuss how to draw the Rocket using Graphics.
- Draw a straight line using the line() function that will act as the Ground Outline.
- Below the above line drawn, fill it with the color green using two functions setfillstyle() and floodfill().
- Create a rectangle using the rectangle() function and color it brown that will act as the rocket Body.
- Create the total four triangles by using the line() function which will act as the wing of the rocket to make it appear more attractive.
- Among them, two will be situated at the two sides of the upper part of the rocket & the lower part of the rocket.
- Color all the wings with blue color.
- Create a triangle using the line() that will act as the head of the rocket. and color it white.
Below is the implementation of the above approach:
Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up