Skip to content

A web-based polygon drawing tool built with Konva.js to measure dimensions, calculate areas, apply scales, and save or reload sketches.

Notifications You must be signed in to change notification settings

Nuraj250/polygon-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖌️ Polygon Drawing Tool

A simple, intuitive polygon drawing tool built using Konva.js. Allows users to interactively draw polygons, measure side lengths, calculate areas, and handle scaled dimensions.

Polygon Drawing Tool Demo


🌟 Features

  • Interactive Polygon Drawing:

    • Draw polygons by clicking to add points.
    • Automatic polygon closure on clicking near the first point.
  • Real-time Dimensioning & Area Calculation:

    • Displays side lengths dynamically on the canvas.
    • Calculates and displays polygon area.
  • Customizable Scale:

    • Adjust scale easily (e.g., 1:10).
    • Dimensions and area adjust automatically.
  • Save and Load:

    • Save your sketches as downloadable JSON files.
    • Reload sketches easily from saved files.
  • Intuitive UI:

    • Modern, clean user interface.
    • Responsive toolbar with clear controls.

📸 Screenshots

Polygon Drawing Area & Dimensions
Drawing Polygon Dimensions & Area

🛠️ Technologies Used

  • HTML5 & CSS3
  • JavaScript
  • Konva.js (Canvas interaction)

🚀 Getting Started

Installation

Clone or download this repository:

git clone https://github.com/Nuraj250/polygon-project.git

Running the Tool

Simply open index.html in your web browser:

polygon-project/
├── index.html
├── style.css
└── script.js

How to Use

  • Click on the canvas to add polygon points.
  • Click close to the first point to finish the polygon.
  • Adjust scale using the input at the top toolbar.
  • Save/load your sketch using provided toolbar buttons.

📁 Project Structure

polygon-project/
├── index.html      # Main HTML file
├── style.css       # UI styling
├── script.js       # Core logic and functionality
└── README.md       # Project Documentation

🎓 Assignment Requirements Covered

  • ✔️ Draw polygon by connecting lines
  • ✔️ Display dimensions and polygon area
  • ✔️ Enter custom scale to update measurements
  • ✔️ Save and load sketches seamlessly

📧 Author

About

A web-based polygon drawing tool built with Konva.js to measure dimensions, calculate areas, apply scales, and save or reload sketches.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published