GithubHelp home page GithubHelp logo

rikilg / geometry-algorithms Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 6.3 MB

Provides implementations of Polygon Triangulation, DCEL and Convex Hull Generation

License: MIT License

HTML 54.89% JavaScript 9.53% CSS 4.56% Makefile 0.07% TeX 26.93% Python 0.37% C++ 3.65%
convex-hull triangulation dcel geometric-algorithms

geometry-algorithms's Introduction

Computational Geometry Assignment

Getting Started

This repo contains implementations of the following 3 algorithms:

  • Convex Hull computation using divide and conquer tangent approach
  • DCEL (Doubly Connected Edge List) data structure implementation
  • Polygon Triangulation using the following algorithms:
    • Plane Sweep method to divide polygon into monotones.
    • Triangulation of each monotone polygon

Each algorithm is implemented seperately in its folder using C++ language. A README file in each folder describes how to run and other information about that particular folder.

Algorithm Directory
├── datasets # folder containing datasets to be tested upon
├── docs # folder containing the documentation of the source code
├── src # folder containing the source code
└── README.md # a readme file describing the algo and how to run it

Plotting Output

Each directory contains a plot.py python program which can be used to plot the output of each algorithm. output of algorithm can be directly piped to this program or given as command line argument

# do this in the src directory if program is compiled in the same directory
# the text in the [] brackets is optional. if given, it prints the input dataset also
./a.out ../datasets/data.txt | ../plot [-i ../datasets/data.txt]

# without piping, save output to file and use it
./a.out ../datasets/data.txt > output.txt
../plot -o output.txt [-i ../datasets/data.txt]

References

The following references have been used to understand and implement the algorithms:

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.