Stumble on 7 solutions for an Apollonius' Problem what is said to be impossible.
As user we won't notice it, we see only 6 solutions proposed, two are almost identical.
The nearest when indicating one of this pair is arbitrary.
Still, there will be one solution that is better than the other.
After research it turns out that this is not limited to 6-7, it can occur whenever there are more solutions.
What happens is that two, typically large solutions, are NOT considered as equal and both are verified to be reasonable tangent.
Again a fixed tolerance is the culprit.
Center and radius NOT equal within RS.PointTolerance = 1e-9 units.
Both are tangent to the given system within RS.PointTolerance.
Typically, squares and roots are exploited and results may vary slightly depending the magnitude of the intermediate values.
Then larger values are less accurate within the Floating Point system.
Various paths result in a larger (>8) collection of candidates.
Of all things, tangent circles are the mathematically more problematic problems.
Comparing solution circles should therefor be done with an adaptive tolerance.
Keeping the best tangent nature of the two solutions when about equal.
Solutions that are identical to a given circle shape of the problem must also be excluded.
Meaning that the functions:
- Apollonius.removeDuplicates
- Apollonius.verify
relying on:
- Apollonius.compareShapes
- Apollonius.shapesTouch
must be merged so that they work in tandem and not one after the other.
verify should not only eliminate false solutions ...
... It must validate a solution with a comparable value for cases of almost duplicates.
Regards,
CVH
Apollonius and 7 solutions
Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Return to “QCAD Programming, Script Programming and Contributing”
Jump to
- General
- ↳ Announcements
- ↳ Chat
- ↳ Site Feedback
- ↳ Pre-sales Questions
- ↳ Introduce Yourself
- QCAD Professional Version
- ↳ QCAD 'How Do I' Questions
- ↳ QCAD Suggestions and Feedback
- ↳ QCAD Voting Corner
- ↳ QCAD Troubleshooting and Problems
- ↳ QCAD Installation and Upgrades
- ↳ QCAD Programming, Script Programming and Contributing
- ↳ QCAD 'Script Add-On & Plug-in challenge' - Work in Progress
- ↳ Finished 'Ready to go' Scripts/Plug-in's
- ↳ QCAD Tips and Tutorials
- ↳ QCAD/CAM
- ↳ What do you use QCAD/CAM for?
- QCAD Community Edition
- ↳ QCAD Community Edition
- International Forums
- ↳ Français
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition (Version 3)
- ↳ Deutsch
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Italiano
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Español
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Português
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Nederlands
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- QCAD Book
- ↳ QCAD - An Introduction to Computer-Aided Design
- ↳ QCAD - Una Introducción al Diseño Asistido por Ordenador
- ↳ QCAD - Eine Einführung in computerunterstütztes Zeichnen (CAD)
- QCAD Part Libraries
- ↳ General
- ↳ Creating DXF/DWG items
- ↳ Creating SVG items
- ↳ Meta Data
- dxflib
- ↳ dxflib Suggestions and Feedback
- ↳ dxflib 'How Do I' Questions
- ↳ dxflib Troubleshooting and Problems