Coder Social home page Coder Social logo

dubersfeld / jarvis-anim Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 167 KB

Java based animated demonstration of the Graham Jarvis March algorithm applied to build the convex hull of a points distribution

Java 53.78% CSS 4.36% HTML 41.86%
jarvis-march convex-hull-algorithms javascript java canvas ajax spring-mvc

jarvis-anim's Introduction

jarvis-anim

Java based animated demonstration of the Graham Jarvis March algorithm applied to build the convex hull of a points distribution

I present here a Java based animated demonstration of the Jarvis March algorithm that is used to find the convex hull of a random points distribution.

Javascript is used for display and initialization only. Here are the implementation details:

A random points distribution is created (browser side)

The distribution is sent to the server as a JSON object.

Then the Jarvis March is executed (server side).

All intermediate results are saved as a collection that is sent to the browser as a JSON object.

The collection is used for animation (browser side).

All candidates are connected in green to the current vertex. The convex hull itself is drawn in black.

This implementation does not use any explicit angle. No trigonometric functions are used. Instead a cross product is used for all angle comparisons.

To launch the demo run the command mvn springboot:run in project directory. When the application has started open a browser and hit URL localhost:8080/convex-hull.

Here are some screen shots that can be seen during the demo:

Animation step alt text

Animation completed alt text

For a step-by-step demonstration of the Jarvis March algorithm please visit these repository:

https://github.com/dubersfeld/jarvis-step

For a demonstration of the Graham Scan algorithm please visit these repositories:

https://github.com/dubersfeld/graham-step

https://github.com/dubersfeld/graham-anim

For a video demo follow this link:

https://youtu.be/FUdqo1eXt3c

Dominique Ubersfeld, Cachan, France

jarvis-anim's People

Contributors

dubersfeld avatar

Watchers

 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.