Skip to content

isInCircleAdapt sketch Java port#311

Open
Komzpa wants to merge 3 commits into
locationtech:masterfrom
Komzpa:patch-1
Open

isInCircleAdapt sketch Java port#311
Komzpa wants to merge 3 commits into
locationtech:masterfrom
Komzpa:patch-1

Conversation

@Komzpa
Copy link
Copy Markdown

@Komzpa Komzpa commented Sep 4, 2018

Do the non-robust calculation and calculation of error margin. If calculation is possibly not robust, fall back on slower math.

https://www.cs.cmu.edu/afs/cs/project/quake/public/code/predicates.c

References #298

if (-det > errbound)) {
return false;
}
return isInCircleDDSlow(a, b, c, p);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should call inCircleDDFast - it is equivalent and faster

@dr-jts
Copy link
Copy Markdown
Contributor

dr-jts commented Sep 4, 2018

Need unit tests before rolling this in.

@dr-jts
Copy link
Copy Markdown
Contributor

dr-jts commented Sep 4, 2018

Good find. This should provide both performance and robustness.

The same approach is currently used in computing the orientationIndex. Also based on Shewchuk's fine work.

@Komzpa
Copy link
Copy Markdown
Author

Komzpa commented Sep 4, 2018

Just in case, I would be happy if someone familiar with java takes over this PR, to make proper formatting, unit tests and code style.

@dr-jts
Copy link
Copy Markdown
Contributor

dr-jts commented Sep 4, 2018

Makes sense. And add some unit tests. Not sure when I'll have time to work on this though.

Komzpa added 3 commits May 25, 2026 04:22
Do the non-robust calculation and calculation of error margin. If calculation is possibly not robust, fall back on slower math.

https://www.cs.cmu.edu/afs/cs/project/quake/public/code/predicates.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants