GithubHelp home page GithubHelp logo

prithvihegde / polygon_decomposition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kishank12312/polygon-decomposition

1.0 0.0 0.0 33 KB

Implemented a research paper titled "Algorithms for the decomposition of a polygon into convex polygons" using Doubly Connected Edge List (DCEL)

C++ 80.69% Python 4.23% HTML 15.09%

polygon_decomposition's Introduction

Decomposition of ploygon into convex polygons

Implementation of the algorithms in Algorithms for the decomposition of a polygon into convex polygons

We implement the algorithm to decompose a given polygon into convex polygons, followed by the merging algorithm, which merges any excess convex polygons obtained in the first step.

Usage

  • Input polygon should be in a text file, and the format of the input is as follows:
    • First line contains a positive integer n, the number of nodes in the input polygon
    • The next n lines contains two space separated numbers denoting the X and Y coordinates of the points in clockwise order
  • Run main.cpp
    • Usage: g++ main.cpp -o main.exe followed by ./main.exe <input_file> where <input_file> is the name of the text file with the input polygon, in the above format.
  • The output after running the first decomposition algorithm is stored in Unmerged Polygon.txt. The output after merging extra polygons (final output) is stored in Merged Polygon.txt
  • Run visual.py to visualize both of these outputs in order.

The timing analysis (Time of execution vs Size of input polygon) is present in Timing Analysis.png

Further analysis on select test cases now available in Report.html

polygon_decomposition's People

Contributors

kishank12312 avatar

Stargazers

Prithvi Hegde avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.