Coder Social home page Coder Social logo

Comments (6)

aayushs98 avatar aayushs98 commented on June 3, 2024

Hey eyal0, it seems that the intersection point in this example is non-integral.
i.e- the PoI is actually: (4700000, -2665584.787245271)
What should be ideally done when there is a non-integral PoI for examples like these?
I am interested in further solving this bug, please guide on how to go about it.

from geometry.

eyal0 avatar eyal0 commented on June 3, 2024

Just pick one of them but consistently. For example, do segment intersection in all 4 configurations and choose the result that has the lowest result.

from geometry.

aayushs98 avatar aayushs98 commented on June 3, 2024

I'm willing to solve this issue. So could you please point me to the file that I can look forward to for solving this issue?

from geometry.

eyal0 avatar eyal0 commented on June 3, 2024

I don't know which file. I'm not familiar with the boost code. :-( i think that it might be in the euclidean directory...?

from geometry.

barendgehrels avatar barendgehrels commented on June 3, 2024

Thanks - but it most probably is not so easy to fix, by just taking one file and make some edits. Besides that, the suggestion of doing segment intersection in all 4 configurations and taking the closest - will decrease performance by a factor 4 or so. We don't want that.

The user, if he uses integer coordinates as input, can ideally (that is the idea of the library, hope it works in this case) output the intersection point in floating point and then round himself as wished.

Alternatively, if the intersection point is indeed that mentioned floating point number, no matter of the order of calling, it actually should be rounded in the same way (which does not 4 calls) and that could be more easy to fix.

from geometry.

eyal0 avatar eyal0 commented on June 3, 2024

In the end, I did it with floating point and rounding. In floating point the result is different depending on the order of the segments but after rounding, the results were the same in the test case above.

There might be a case where even doing it in floating point and then rounding still gives two different answers. I'm not sure. I would guess probably yes.

from geometry.

Related Issues (20)

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.