From b16e247519b9b8ccff1c74cf31d0c59f42b6a5f2 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Fri, 26 Apr 2013 21:43:29 +0000 Subject: add comment for computing max-diff between conic and its bounding quad git-svn-id: http://skia.googlecode.com/svn/trunk@8885 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkGeometry.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core') diff --git a/src/core/SkGeometry.cpp b/src/core/SkGeometry.cpp index 688445826d..14e4fa2bf7 100644 --- a/src/core/SkGeometry.cpp +++ b/src/core/SkGeometry.cpp @@ -1654,3 +1654,14 @@ void SkConic::computeTightBounds(SkRect* bounds) const { void SkConic::computeFastBounds(SkRect* bounds) const { bounds->set(fPts, 3); } + +/* + * "High order approximation of conic sections by quadratic splines" + * by Michael Floater, 1993 + * + * Max error between conic and simple quad is bounded by this equation + * + * a <-- w - 1 (where w >= 0) + * diff <-- a * (p0 - 2p1 + p2) / (4*(2 + a)) + */ + -- cgit v1.2.3