Lines Matching refs:normals
445 float normals[3][2];
452 normals[0][0] = b->y2 - b->y1;
453 normals[0][1] = b->x1 - b->x2;
454 dist = sqrt(normals[0][0]*normals[0][0] + normals[0][1]*normals[0][1]);
457 normals[0][0] /= dist;
458 normals[0][1] /= dist;
460 normals[2][0] = b->y4 - b->y3;
461 normals[2][1] = b->x3 - b->x4;
462 dist = sqrt(normals[2][0]*normals[2][0] + normals[2][1]*normals[2][1]);
465 normals[2][0] /= dist;
466 normals[2][1] /= dist;
468 normals[1][0] = b->x1 - b->x2 - b->x3 + b->x4;
469 normals[1][1] = b->y1 - b->y2 - b->y3 + b->y4;
470 dist = -1*sqrt(normals[1][0]*normals[1][0] + normals[1][1]*normals[1][1]);
471 normals[1][0] /= dist;
472 normals[1][1] /= dist;
475 float cos_a = normals[i][0]*normals[i+1][0] + normals[i][1]*normals[i+1][1];
485 normals[1][0] = -normals[1][0];
486 normals[1][1] = -normals[1][1];
492 circle[0][0] = b->x1 + normals[0][0]*offset;
493 circle[0][1] = b->y1 + normals[0][1]*offset;
495 circle[1][0] = 0.5*(b->x1 + b->x4) + normals[1][0]*offset;
496 circle[1][1] = 0.5*(b->y1 + b->y4) + normals[1][1]*offset;
498 circle[2][0] = b->x4 + normals[2][0]*offset;
499 circle[2][1] = b->y4 + normals[2][1]*offset;
506 o->x2 = circle[i][0] - normals[i][1]*kappa;
507 o->y2 = circle[i][1] + normals[i][0]*kappa;
508 o->x3 = circle[i+1][0] + normals[i+1][1]*kappa;
509 o->y3 = circle[i+1][1] - normals[i+1][0]*kappa;