Shape Coordinate System

This virtual coordinate system shows the positions of the shapes you create, along with their area and perimeter. Additionally, the shapes can be moved or scaled once created.

Figure 1.1. Shape coordinate system demo

This project involves the creation of a two-dimensional virtual coordinate system, allowing you to store basic geometric shapes coordinate positions.

The main menu screen consists of the following options:

  • add - Create a new shape
  • shift - Move or scale an existing shape
  • menu - Displays the list of user commands
  • display - Displays a list of shapes created
  • exit - Exits the program

Upon inputting the 'add' command, the user is brought to a new menu, where you can select which shapes to add. The commands include:

  • rectangle [x_coordinate] [y_coordinate] [height] [width] - Creates a rectangle
  • square [x_coordinate] [y_coordinate] [edge_length] - Creates a square
  • circle [x_coordinate] [y_coordinate] [radius] - Creates a circle

The 'shift' command provides two options: move or scale. The shift menu looks like the following:

  • move [shape_index] [x_coordinate] [y_coordinate] - Moves a created shape
  • scale [shape_index] [x_scale_amount] [y_scale_amount] - Scales a created shape