Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Precision issues #3

Open
grimsa opened this issue Jan 6, 2016 · 0 comments
Open

Precision issues #3

grimsa opened this issue Jan 6, 2016 · 0 comments

Comments

@grimsa
Copy link
Owner

grimsa commented Jan 6, 2016

As floating point numbers are used to represent coordinates, there are precision issues (having cumulative effects).

For example, if we are calculating the location of a point that divides an edge by a previously calculated ratio, sometimes it might produce a point that lies slightly off the edge. In once case around 4% difference in expected and actual areas of subpolygon was observed.

Ideas for improvement:

  • review order of arithmetic actions. Maybe some calculations could also be simplified to improve precision.
  • for each point produced, track the edge it belongs to and use that in further calculations.
  • Alternatively, snap produced points to the edge it belonged to.
  • Or make small adjustments once each subpolygon is produced.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant