Code Monkey home page Code Monkey logo

convex-hull-algorithm's Introduction

Convex-Hull-algorithm

Four algorithms to implement the problem of finding the smallest convex polygon for a set of points which contains all the points in the plane. The four algorithms are:

  1. The divide and conquer approach
  2. The Graham Scan Algorithm.
  3. Jarvis March Algorithm.
  4. Quickhull Algorithm.

There are two options for executing the code. One is where the user gives the input and for this set of points, the convex polygon is found for these points using the divide and conquer approach.

The second approach is running for the predefined inputs which vary from input size 10 to 1000000. the range of the inputs changes from (0,100), (0,1000) and (0,10000). This will run for 48 different test cases and will take time to plot all the graphs since the size of inputs increases to 1000000.
The user interface is written in python and the algorithms are written in cpp.
The implementation files that are called are:

  1. divide_and_conquer.cpp(To illustrate the output when the user gives the input).
  2. divide_and_conquer_analysis.cpp
  3. quickhull.cpp
  4. graham_scan.cpp
  5. jarvis_march.cpp

Make sure g++ is installed in your system.
Python modules required: subprocess, matplotlib
To run the code, run: python ui.py

Then choose the option you want.

Github link: https://github.com/NinaadRao/Convex-Hull-algorithm

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.