Curve;

// Find the angle between the ending tangent and the x axis.
dAngle1 = Arctangent(c2y-e2y,c2x-e2x);
x1 = c2y -e2y;
x2 = c2x -e2x;

// From the drawing we calculate the half angle of the arrow.
dAngle2 = Arctangent(2,5);

// The center length of the arrow is made to be one grid width.
d1 = grid;

x1 = LengthTimesCosine(d1,dAngle1);
y1 = LengthTimesSine(d1,dAngle1);
BezierCurve(c1x,c1y,c2x,c2y,e1x,e1y,e2x +x1,e2y +y1,20);

//Draw the arrowhead.

// Draw the right side of the arrowhead.
dAngle3 = dAngle1 - dAngle2;
d3 = 1.346*grid;

x3 = LengthTimesCosine(d3,dAngle3);
y3 = LengthTimesSine(d3,dAngle3);
MoveTo(e2x,e2y);
LineTo(e2x+x3,e2y+y3);

// Draw the left side of the arrowhead.
dAngle4 = dAngle1 +dAngle2;
d4 = d3;

x4 = LengthTimesCosine(d4,dAngle4);
y4 = LengthTimesSine(d4,dAngle4);

LineTo(e2x +x1,e2y+y1);
LineTo(e2x +x4,e2y+y4);
LineTo(e2x,e2y);

 