Hi,
I know the radius, start point, end point and the origin. By applying distance formula,
d = sqr((x1 - x2)^2 + (y1 - y2)^2)
I end up with 2 equations.
1.) distance between middle point and origin = radius,
2.) distance between start point and middle point = distance between end point and middle point
Therefore,
(x1,y1) = middle point
x2 = oArcGeom.Origin.X
y2 = oArcGeom.Origin.Y
x3 = oArcGeom.Start.X
y3 = oArcGeom.Start.Y
x4 = oArcGeom.End.X
y4 = oArcGeom.End.Y
1.) distance between middle point and origin = radius:
x1 ^ 2 - 2 * (x1 * x2) + x2 ^ 2 = oArcGeom.Radius - y1 ^ 2 + 2 * (y1 * y2) - y2 ^ 2
2.) distance between start point and middle point = distance between end point and middle point:
2 * (x1 * x4) - 2 * (x1 * x3) + x3 ^ 2 - x4 ^ 2 = 2 * (y1 * y3) - 2 * (y1 * y4) + y4 ^ 2 - y3 ^ 2
But I don't know how to simplify more, and VB cannot accept the above formula.
Can any one help me?




Reply With Quote