Lines Matching defs:degree
74 Point2 *w; /* Ctl pts for 5th-degree eqn */
79 /* Convert problem to 5th-degree Bezier form */
82 /* Find all possible roots of 5th-degree equation */
125 * Given a point and a Bezier curve, generate a 5th-degree
137 Point2 *w; /* Ctl pts of 5th-degree curve */
190 * Given a 5th-degree equation in Bernstein-Bezier form, find
194 static int FindRoots(w, degree, t, depth)
196 int degree; /* The degree of the polynomial */
208 switch (CrossingCount(w, degree)) {
219 if (ControlPolygonFlatEnough(w, degree)) {
220 t[0] = ComputeXIntercept(w, degree);
229 Bezier(w, degree, 0.5, Left, Right);
230 left_count = FindRoots(Left, degree, left_t, depth+1);
231 right_count = FindRoots(Right, degree, right_t, depth+1);
253 static int CrossingCount(V, degree)
255 int degree; /* Degreee of Bezier curve */
262 for (i = 1; i <= degree; i++) {
278 static int ControlPolygonFlatEnough(V, degree)
280 int degree; /* Degree of polynomial */
296 /* line connecting V[0] and V[degree] */
297 distance = (double *)malloc((unsigned)(degree + 1) * sizeof(double));
303 a = V[0].y - V[degree].y;
304 b = V[degree].x - V[0].x;
305 c = V[0].x * V[degree].y - V[degree].x * V[0].y;
309 for (i = 1; i < degree; i++) {
325 for (i = 1; i < degree; i++) {
389 static double ComputeXIntercept(V, degree)
391 int degree; /* Degree of curve */
400 XNM = V[degree].x - V[0].x;
401 YNM = V[degree].y - V[0].y;
425 static Point2 Bezier(V, degree, t, Left, Right)
426 int degree; /* Degree of bezier curve */
437 for (j =0; j <= degree; j++) {
442 for (i = 1; i <= degree; i++) {
443 for (j =0 ; j <= degree - i; j++) {
452 for (j = 0; j <= degree; j++) {
457 for (j = 0; j <= degree; j++) {
458 Right[j] = Vtemp[degree-j][j];
462 return (Vtemp[degree][0]);