Robust - Degeneracies & Robustness & Robustness A...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
egeneracies Robustness A Brief Introduction
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
hases of Geometric Algorithm Phases of Geometric Algorithm Phase 1: Ignore degenerate cases e.g.: Infinite slope of a line Sometimes done in literature via general position assumption(s): g e.g. no 2 points with same x coordinate; no 3 points collinear; no 4 points cocircular. hase 2: Phase 2: Adjust algorithm based on degeneracies/special cases. Phase 3: ctual implementation Actual implementation Make sure frequently used core primitives are implemented well. e.g.: Is p 3 on the right or left of line segment p 1 p 2 ? Decide to do it yourself or use CG package that addresses robustness. More on this later… p 2 Source: de Berg et al. p 1 p 3
Background image of page 2
Point Representation Even double precision cannot faithfully represent real numbers… General floating point taboo ( don’t ever do this, either in single or even double precision!) double variable 1, variable 2; // calculations…. (variable1 == variable 2) // more calculations } if (variable1 == variable 2) { // more calculations…} At a minimum, use epsilon testing: const eps = 1.0E 6; // or some other sufficiently (for your application) small value ouble variable 1, variable 2; double variable 1, variable 2; // calculations…. if (abs(variable1–var iab le2) < eps) { // more calculations…} Even this is not enough to safeguard most applications! Connectivity/topology of geometric object can be destroyed p 2 y/ p gy g j y e.g. Wrong answer to this question (from previous slide): Is p 3 on the right or left of line segment p 1 p 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 12

Robust - Degeneracies &amp; Robustness &amp; Robustness A...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online