Method for fast generation of parametric curves employing a pre-calculated number of line segments in accordance with a determined error threshold
First Claim
1. A computer graphics method for approximating a curve having beginning and end coordinates by a series of connected straight line segments, said method employing a recursive subdivision of said curve and control polygons, each control polygon having at least a first straight line segment extending between two coordinates on said curve and additional connecting line segments to create a closed plane figure, a maximum distance between said first straight line segment and said curve defined as an error value, said method comprising computer implemented the steps of:
- a. establishing an error value threshold Δ
E between a said first straight line segment of a control polygon and said curve;
b. establishing a control polygon whose first straight line segment has terminal vertices coincident with said curve'"'"'s beginning and end coordinates, calculating an error value for said control polygon and testing said error value to determine if it exceeds Δ
E and if yes;
c. modifying said calculated error value by a factor and testing said modified error value to determine if it is greater than Δ
E, and if it is, again modifying said modified error value by said same factor, and repeating said test, said modifying action being repeated on a last modified value until a new modified value is equal to or less than Δ
E ;
d. establishing 2n control polygons between said curve'"'"'s beginning and end coordinates, where n equals the number of error values calculated in steps b and c;
e. creating an approximated curve by enabling joinder of said first straight line segments of each said 2n control polygons; and
f. displaying the approximated curve on a computer display, whereby a display delay time for the step of displaying is related to an execution time for the computer graphics method.
0 Assignments
0 Petitions
Accused Products
Abstract
A method enables the prediction of the number of subdivisions of a curve that will be required by control polygons to assure that a resulting straight line representation of the curve will not exceed a preset error threshold. The method is applicable to cubics and parametric quadratics including parabolas, ellipses and hyperbolas. In each case, the prediction of the number of subdivisions eliminates the need for a detailed error calculation at each subdivision step, thereby enabling an error calculation to be carried out only once in the process.
80 Citations
14 Claims
-
1. A computer graphics method for approximating a curve having beginning and end coordinates by a series of connected straight line segments, said method employing a recursive subdivision of said curve and control polygons, each control polygon having at least a first straight line segment extending between two coordinates on said curve and additional connecting line segments to create a closed plane figure, a maximum distance between said first straight line segment and said curve defined as an error value, said method comprising computer implemented the steps of:
-
a. establishing an error value threshold Δ
E between a said first straight line segment of a control polygon and said curve;b. establishing a control polygon whose first straight line segment has terminal vertices coincident with said curve'"'"'s beginning and end coordinates, calculating an error value for said control polygon and testing said error value to determine if it exceeds Δ
E and if yes;c. modifying said calculated error value by a factor and testing said modified error value to determine if it is greater than Δ
E, and if it is, again modifying said modified error value by said same factor, and repeating said test, said modifying action being repeated on a last modified value until a new modified value is equal to or less than Δ
E ;d. establishing 2n control polygons between said curve'"'"'s beginning and end coordinates, where n equals the number of error values calculated in steps b and c; e. creating an approximated curve by enabling joinder of said first straight line segments of each said 2n control polygons; and f. displaying the approximated curve on a computer display, whereby a display delay time for the step of displaying is related to an execution time for the computer graphics method. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computer graphics incremental method for approximating a cubic curve, having beginning and end coordinates, by a series of connected straight line segments, said method predicting the number of steps required to achieve a desired error threshold Δ
-
E between the curve and a series of polygon line segments, wherein Δ
E is a maximum distance between said curve and a line segment connecting two coordinates on said curve, each said line segment forming a portion of a polygon, said method comprising computer implemented steps of;a) computing ##EQU51## b) choosing a step size t=2-L ;
c) computing x(0), xt (0), xtt (0), xttt (0) to a precision Δ
E 2-L ;d) computing y(0), yt (0), ytt (0), yttt (0) to a precision Δ
E 2-L ; ande) for (t=Δ
t to 1, by Δ
t increments) computing;
space="preserve" listing-type="equation">x(t)=x(t-Δ
t)+x.sub.t (t-Δ
t),
space="preserve" listing-type="equation">x.sub.t (t)=x.sub.t (t-Δ
t)+x.sub.tt (t-Δ
t),
space="preserve" listing-type="equation">x.sub.tt (t)=x.sub.tt (t-Δ
t)+x.sub.ttt (t-Δ
t),
space="preserve" listing-type="equation">y(t)=y(t-Δ
t)+y.sub.t (t-Δ
t),
space="preserve" listing-type="equation">y.sub.t (t)=y.sub.t (t-Δ
t)+y.sub.tt (t-Δ
t),
space="preserve" listing-type="equation">y.sub.tt (t)=y.sub.tt (t-Δ
t)+y.sub.ttt (t-Δ
t), anddrawing a line from x(t-Δ
t), y(t-Δ
t) to x(t), y(t) for each Δ
t increment to create an approximated curvewhere;
L=number of curve subdivisions;t=time; x(0), y(0) are x and y coordinate functions at curve point t=0, etc.
space="preserve" listing-type="equation">x(0)=x coordinate function at t=0,
space="preserve" listing-type="equation">x.sub.t (0)=x.sub.t (t.sub.0 -Δ
t)-x(t.sub.0),
space="preserve" listing-type="equation">x.sub.tt (0)=x.sub.t (t.sub.0 +Δ
t)-x.sub.t (t.sub.0),
space="preserve" listing-type="equation">x.sub.ttt (0)=x.sub.tt (t.sub.0 +Δ
t) -x.sub.tt (t.sub.0),
space="preserve" listing-type="equation">y(0)=y coordinate function at t=0,
space="preserve" listing-type="equation">y.sub.t (0)=y.sub.t (t.sub.0 -Δ
t)-y(t.sub.0),
space="preserve" listing-type="equation">y.sub.tt (0)=y.sub.t (t.sub.0 +Δ
t)-y.sub.t (t.sub.0),
space="preserve" listing-type="equation">y.sub.ttt (0)=y.sub.tt (t.sub.0 +Δ
t) -y.sub.tt (t.sub.0), anddisplaying the approximated curve on a computer display, whereby a display delay time for the step of displaying is related to an execution time for the computer graphics method.
-
E between the curve and a series of polygon line segments, wherein Δ
-
12. A computer graphics incremental method for approximating an ellipse, having beginning and end coordinates, by a series of connected straight line segments, said method predicting the number of steps required to achieve a desired error threshold Δ
-
E between an ellipse and a series of line segments, wherein Δ
E is a maximum distance between said ellipse and a line segment connecting two coordinates on said ellipse, said method comprising computer implemented steps of;a) computing L=log4 (mellipse) where ##EQU52## b) choosing a step size Δ
t=2-L c) computing X(
0), Xt (0), Xtt (0) to a precision Δ
E 2-L ;d) computing Y(0), Yt (0), Ytt (0) to a precision Δ
E 2-L ;e) computing w(0), wt (0), wtt (0) to a precision Δ
E 2-L ; andf) for (t=Δ
t to 1, by Δ
t increments) computing
space="preserve" listing-type="equation">X(t)=X(t-Δ
t)+X.sub.t (t-Δ
t),
space="preserve" listing-type="equation">X.sub.t (t)=X.sub.t (t-Δ
t)+X.sub.tt (t-Δ
t),
space="preserve" listing-type="equation">Y(t)=Y(t-Δ
t)+Y.sub.t (t-Δ
t),
space="preserve" listing-type="equation">Y.sub.t (t)=Y.sub.t (t-Δ
t)+Y.sub.tt (t-Δ
t),
space="preserve" listing-type="equation">w(t)-w(t-Δ
t)+w.sub.t (t-Δ
t),
space="preserve" listing-type="equation">w.sub.t (t)=w.sub.t (t-Δ
t)+w.sub.tt (t-Δ
t),
space="preserve" listing-type="equation">x(t)=X(t)/w(t),
space="preserve" listing-type="equation">y(t)=y(t)/w(t), anddrawing a line from x(t-Δ
t), y(t-Δ
t) to x(t), y(t) for each Δ
t increment to create an approximated curvewhere;
L=number of curve subdivisions;w0, w1 are curve weight and values at curve coordinates 0 and 1, respectively; t=time; a1, a2 are either coordinate values x1, x2 or y1, y2, as the case may be;
space="preserve" listing-type="equation">X(0)=X(0)w(0)(at t=0);
space="preserve" listing-type="equation">X.sub.t (0)=X0)(t.sub.0 +Δ
t)-X(0)(t.sub.0);
space="preserve" listing-type="equation">X.sub.tt (0)=X.sub.t (0)(t.sub.0 +Δ
t)-X.sub.t (0)(t.sub.0);
space="preserve" listing-type="equation">X.sub.tt (0)=X.sub.tt (0)(t.sub.0 +Δ
t)-X.sub.t (0)(t.sub.0);
space="preserve" listing-type="equation">w(0)=weight of curve at t=0;
space="preserve" listing-type="equation">w.sub.t (0)=w(0)(t.sub.0 +Δ
t)-w(0)(t.sub.0);
space="preserve" listing-type="equation">w.sub.tt (0)=w.sub.t (0)(t.sub.0 +Δ
t)-w.sub.t (0)(t.sub.0); anddisplaying the approximated curve on a computer display, whereby a display delay time for the step of displaying is related to an execution time for the computer graphics method.
-
E between an ellipse and a series of line segments, wherein Δ
-
13. A computer graphics incremental method for approximating a hyperbola, having beginning and end coordinates, by a series of connected straight line segments, said method predicting the number of steps L required to achieve a desired error threshold Δ
-
E between an hyperbola and a series of line segments, wherein Δ
E is a maximum distance between said hyperbola and a line segment connecting two coordinates on said hyperbola, said method comprising computer implemented steps of;a) computing L=log4 (mhyperbola) where mhyperbola = ##EQU53## b) choosing a step size Δ
t=2-L c) computing X(
0), Xt (0), Xtt (0) to a precision Δ
E 2-L ;d) computing Y(0), Yt (0), Ytt (0) to a precision Δ
E 2-L ;e) computing w(0), wt (0), wtt (0) to a precision Δ
E 2-L ; andf) for (t=Δ
t to 1, by Δ
t increments) computing
space="preserve" listing-type="equation">X(t)=X(t-Δ
t)+X.sub.t (t-Δ
t),
space="preserve" listing-type="equation">x.sub.t (t)=X.sub.t (t-Δ
t)+X.sub.tt (t-Δ
t),
space="preserve" listing-type="equation">Y(t)=Y(t-Δ
t)+y.sub.t (t-Δ
t),
space="preserve" listing-type="equation">y.sub.t (t)=y.sub.t (t-Δ
t)+y.sub.tt (t-Δ
t),
space="preserve" listing-type="equation">w(t)=w(t-Δ
t)+w.sub.t (t-Δ
t),
space="preserve" listing-type="equation">w.sub.t (t)=w.sub.t (t-Δ
t)+w.sub.tt (t-Δ
t),
space="preserve" listing-type="equation">x(t)=X(t)/w(t),
space="preserve" listing-type="equation">y(t)=Y(t)/w(t), anddrawing a line from x(t-Δ
t), y(t-Δ
t) to x(t), y(t) for each Δ
t increment to create an approximated curvewhere;
L=number of curve subdivisions;w0, w1 are curve weight and values at curve coordinates 0 and 1, respectively; t=time; a1, a2 are either coordinate values x1, x2 or y1, y2, as the case may be;
space="preserve" listing-type="equation">X(0)=X(0) w(0)(at t=0);
space="preserve" listing-type="equation">X.sub.t (0)=X(0)(t+Δ
t)-X(0)(t.sub.0);
space="preserve" listing-type="equation">X.sub.tt (0)=x.sub.t (0)(t.sub.0 +Δ
t)-X.sub.t (0)(t.sub.0);
space="preserve" listing-type="equation">X.sub.ttt (0)=X.sub.tt (0)(t.sub.0 +Δ
t)-X.sub.tt (0)(t.sub.0);
space="preserve" listing-type="equation">w(0)=weight of curve at t=0;
space="preserve" listing-type="equation">w.sub.t (0)=w(0)(t.sub.0 +Δ
t)-w(0)(t.sub.0);
space="preserve" listing-type="equation">w.sub.tt (0)=w.sub.t (0)(t.sub.0 +Δ
t)-w.sub.t (0)(t.sub.0); anddisplaying the approximated curve on a computer display, whereby a display delay time for the step of displaying is related to an execution time for the computer graphics method.
-
E between an hyperbola and a series of line segments, wherein Δ
-
14. A computer graphics system for approximating a curve having beginning and end coordinates by a series of connected straight line segments, said system employing a recursive subdivision procedure for said curve and control polygons to accomplish subdivision of said curve, each control polygon having at least a first straight line segment extending between two coordinates on said curve and additional connecting line segments to create a closed plane figure, a maximum distance between said first straight line segment and said curve defined as an error value, said system including a stored error value threshold Δ
-
E, said system comprising;
means for establishing a control polygon whose first straight line segment has terminal vertices coincident with beginning and end coordinates of said curve; means for calculating an error value for said control polygon and testing said error value to determine if it exceeds Δ
E and if yes, modifying said error value that was calculated by a factor and testing said modified error value to determine if said modified error value is greater than Δ
E, and if yes, again modifying said modified error value by said same factor and repeating said testing, said modifying being repeated on a last modified value by said means for calculating until a new modified value is equal to or less than Δ
E ;means for establishing 2n control polygons between said beginning and end coordinates of said curve, where n equals a number of error values calculated by said means for calculating; and means for creating an approximated curve by joining said first straight line segments of each of said 2n control polygons and displaying the approximated curve.
-
E, said system comprising;
Specification