Sample bentley-ottman implementation (with snap rounding)