Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 2.07 KB

README.md

File metadata and controls

44 lines (30 loc) · 2.07 KB

Welcome to Polygons-with-PyQt

You get to draw some polygons just by mouse clicks or you can draw circles with given center and radius. UI is made simple and convenient, even for a novice.

Pip3 Modules required:

PyQt5, Matplotlib, Numpy

Instructions:

  1. Run the code with command python3 polygon.py
  2. Click on 'Button:Draw a polygon', to draw a polygon
  3. A new plain window appears, with help of mouse, click(right (or) left) on the screen and points will be appeared as dots on the screen.
  4. Now after completion, press 'CTRL+R' or Run action from the file menu to plot the polygon
  5. Use 'CTRL+Q' to exit from this window.
  6. Click on 'Button:Draw a circle', to draw a circle.
  7. A new window appears where you will be prompted to enter, x-coordinate and y-coordinate of center of circle and also radius of circle.
  8. Click on 'Button:Click here to plot', to display plot of required circle.
  9. If the requirement is completed you can close the window by clicking default close window feature.
  10. Click on 'Button:Multiple plots', to draw multiple polygons and circles on the same plot.
  11. A new window pops up where you can add a circle (or) polygon to the plot, and also clear the plot.
  12. If you click on 'Button:Add a circle', a new text editor window pops up where you can enter required circle info, in 'x','y','r' format and save file by CTRL+S as 'circle.txt'. Add as many circles as required.
  13. Use 'CTRL+Q' to exit from this window.
  14. Similarly, if you click on 'Button:Add a polygon', a new text editor window pops up where you can enter required polygon info, in 'x','y' format and save file by CTRL+S as 'polygon.txt'. Add as many vertices as required.
  15. Use 'CTRL+Q' to exit from this window.
  16. Click on 'Button:Plot', to display plot of added circles and polygon.
  17. Use 'CTRL+O' to open and edit existing text files, 'circle.txt' and 'polygon.txt'.
  18. Output plot will be circles and polygons, where the area of circles will be shaded.
  19. Click on 'Button:Clear', to clear the plots and also the text files.
  20. Use 'CTRL+Q' to exit from this window.