In this article, we will discuss how to draw a 2D cricket ground is being designed using computer graphics.
- Draw a circle using the circle() function. This will act as the Ground Outline.
- Color the above circle with green using the setfillstyle() and floodfill() functions.
- Then to implement 30 yards Outline using the ellipse() function.
- Then implement two Rectangles using the rectangle() function. Between them, one is the outer rectangle and another is the inner rectangle.
- Color the inner rectangle will brown color using the setfillstyle() and floodfill() functions.
- Divide the inner rectangle using the two rectangle() function. Between them, one is the upper stump Line and another is the lower stump line.
- Use two lines to increase the stump line using the line() function.
Below is the program for the above approach: