In this article, we will discuss how to draw the Rocket using Graphics.

Approach:

  • 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.

#c #c programs #c-graphics

C Program to Create A Rocket using Graphics
2.50 GEEK