Giter VIP home page Giter VIP logo

Comments (2)

brian3kb avatar brian3kb commented on August 15, 2024

Thanks for the feedback - looks like this could be a JavaScript precision error due to the values being passed in - if you divide all your values by 10, you get an accurate hull.

The primary use-case for the library is for mapping using latitude and longitude values.

I have created this plunkr https://plnkr.co/zp2S0Tf5BTzewfUzqQVi showing your values (divided by 10) plotted on google maps - as you can see, a correct hull is shown.

By doing this, the output is:
[[466,231],[675,258],[673,252],[666,240],[661,234],[656,228],[647,219],[633,207],[627,202],[617,195],[610,191],[599,185],[595,184],[591,183],[575,183],[567,184],[552,187],[544,189],[536,191],[510,201],[506,203],[495,209],[492,211],[469,228]]

On the plunker, you can zoom right in to see the hull more clearly and the points that are contained within the hull (points shown here are all the points passed in, the bounding box connects the calculated hull points).

image

from graham_scan_js.

vnermolaev avatar vnermolaev commented on August 15, 2024

I created a pull request fixing the issue. See my comments there.

from graham_scan_js.

Related Issues (10)

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.