Beispiel #1
0
static Vector2 ComputeRightTangent(
    Point2	*d,			/*  Digitized points		*/
    int		end)		/*  Index to "right" end of region */
{
    Vector2	tHat2;
    tHat2 = V2SubII(d[end-1], d[end]);
    tHat2 = *V2Normalize(&tHat2);
    return tHat2;
}
Beispiel #2
0
/*
 * ComputeLeftTangent, ComputeRightTangent, ComputeCenterTangent :
 *Approximate unit tangents at endpoints and "center" of digitized curve
 */
static Vector2 ComputeLeftTangent(
    Point2	*d,			/*  Digitized points*/
    int		end)		/*  Index to "left" end of region */
{
    Vector2	tHat1;
    tHat1 = V2SubII(d[end+1], d[end]);
    tHat1 = *V2Normalize(&tHat1);
    return tHat1;
}
Beispiel #3
0
Vector2 CBCStroke::ComputeRightTangent(
									   DISCURVE& d,			/*  Digitized points		*/
									   int		end)		/*  Index to "right" end of region */
{
	Vector2	tHat2;
	tHat2 = V2SubII(d[end-1], d[end]);
	tHat2 = *V2Normalize(&tHat2);
	return tHat2;
}
Beispiel #4
0
/*
* ComputeLeftTangent, ComputeRightTangent, ComputeCenterTangent :
*Approximate unit tangents at endpoints and "center" of digitized curve
*/
Vector2 CBCStroke::ComputeLeftTangent(
									 DISCURVE& d,			/*  Digitized points*/
									  int		end)		/*  Index to "left" end of region */
{
	Vector2	tHat1;
	tHat1 = V2SubII(d[end+1], d[end]);
	tHat1 = *V2Normalize(&tHat1);
	return tHat1;
}
static Vector2 ComputeCenterTangent(Point2 *d, int center) {
    Vector2 V1, V2, tHatCenter;

    V1 = V2SubII(d[center-1], d[center]);
    V2 = V2SubII(d[center], d[center+1]);
    tHatCenter.x = (V1.x + V2.x)/2.0;
    tHatCenter.y = (V1.y + V2.y)/2.0;
    tHatCenter = *V2Normalize(&tHatCenter);
    return tHatCenter;
}
Beispiel #6
0
static Vector2 ComputeCenterTangent(
    Point2	*d,			/*  Digitized points			*/
    int		center)		/*  Index to point inside region	*/
{
    Vector2	V1, V2, tHatCenter;

    V1 = V2SubII(d[center-1], d[center]);
    V2 = V2SubII(d[center], d[center+1]);
    tHatCenter.x = (V1.x + V2.x)/2.0;
    tHatCenter.y = (V1.y + V2.y)/2.0;
    tHatCenter = *V2Normalize(&tHatCenter);
    return tHatCenter;
}
static Vector2 ComputeRightTangent(Point2 *d, int end) {
    Vector2 tHat2;
    tHat2 = V2SubII(d[end-1], d[end]);
    tHat2 = *V2Normalize(&tHat2);
    return tHat2;
}
/*
 * ComputeLeftTangent, ComputeRightTangent, ComputeCenterTangent :
 *Approximate unit tangents at endpoints and "center" of digitized curve
 */
static Vector2 ComputeLeftTangent(Point2 *d, int end) {
    Vector2 tHat1;
    tHat1 = V2SubII(d[end+1], d[end]);
    tHat1 = *V2Normalize(&tHat1);
    return tHat1;
}