- From: Philip Taylor <excors+whatwg@gmail.com>
- Date: Fri, 25 May 2007 12:04:16 +0100
On 17/05/07, Philip Taylor <excors+whatwg at gmail.com> wrote: > On 16/05/07, Ian Hickson <ian at hixie.ch> wrote: > > For arc() and arcTo() the definition seems complete, but I'm not familiar > > enough with graphics theory to know what quadraticCurveTo() and > > bezierCurveTo() need. Could you suggest some text? > > I'd probably just add the equations of the curves kind of like: > > """ > The quadraticCurveTo(cpx, cpy, x, y) method must do nothing if the > context has no subpaths. Otherwise it must connect the last point in > the subpath to the given point (x, y) by a quadratic curve with > control point (cpx, cpy), and must then add the given point (x, y) to > the subpath. The curve must cover the points $C(t) = (1-t)^2 P_0 + 2 t > (1-t) P_1 + t^2 P_2$ with t ranging from 0 to 1, where P_0 is the last > point in the subpath, P_1 is the control point (cpx, cpy), and P_2 is > the point (x, y). > > The bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) method must do nothing > if the context has no subpaths. Otherwise, it must connect the last > point in the subpath to the given point (x, y) using a B?zier curve > with control points (cp1x, cp1y) and (cp2x, cp2y). Then, it must add > the point (x, y) to the subpath. The curve must cover the points $C(t) > = (1-t)^3 P_0 + 3 t (1-t)^2 P_1 + 3 t^2 (1-t) P_2 + t^3 P_3$ with t > ranging from 0 to 1, where P_0 is the last point in the subpath, P_1 > is the control point (cp1x, cp1y), P_2 is the control point (cp2x, > cp2y), and P_3 is the point (x, y). > """ > (Also s/bezier/B?zier/) Actually, since I now better understand what "B?zier curve" means, I'd say something more like """ The quadraticCurveTo(cpx, cpy, x, y) method [...] must connect the last point in the subpath to the given point (x, y) using a quadratic B?zier curve with control point (cpx, cpy) [...] The bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) method [...] must connect the last point in the subpath to the given point (x, y) using a cubic B?zier curve with control points (cp1x, cp1y) and (cp2x, cp2y) [...] """ and probably not bother with giving equations, since "quadratic B?zier curve" and "cubic B?zier curve" are sufficiently well-known and well-defined (unlike the old "quadratic curve" which seems to be an undefined or differently-defined term, and the old "B?zier curve" which is a whole family of curves of varying degrees). -- Philip Taylor excors at gmail.com
Received on Friday, 25 May 2007 04:04:16 UTC