Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify: Add input & output error to simplifySloppy #217

Merged
merged 1 commit into from
Jan 1, 2021
Merged

Conversation

zeux
Copy link
Owner

@zeux zeux commented Dec 31, 2020

This change makes simplifySloppy interface match that of simplify, so
that an error limit can be specified up front, and the resulting error
is returned when requested.

As a consequence, simplifySloppy can no longer guarantee that the output
will be at or under the requested triangle count; this unifies the
interface between simplify & simplifySloppy further and gives us some
opportunity to compute triangle count in a more approximate way in the
future.

As a result we may need to compute the triangle count for the min. grid
size before simplification starts; this sometimes increases the number
of passes we need to do by 1, but in aggregate actually decreases the
number of passes as the interpolation search gets more data and can be
more precise.

Fixes #112.

This change makes simplifySloppy interface match that of simplify, so
that an error limit can be specified up front, and the resulting error
is returned when requested.

As a consequence, simplifySloppy can no longer guarantee that the output
will be at or under the requested triangle count; this unifies the
interface between simplify & simplifySloppy further and gives us some
opportunity to compute triangle count in a more approximate way in the
future.

As a result we may need to compute the triangle count for the min. grid
size before simplification starts; this sometimes increases the number
of passes we need to do by 1, but in aggregate actually *decreases* the
number of passes as the interpolation search gets more data and can be
more precise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

simplifySloppy doesn't have a way to specify the target error
1 participant