开发者

Intersecting points of curve!

I am drawing a开发者_运维知识库n arc within a square or a polygon with the maximum possible radius inside. When the arc is drawn within the boundary of the square or polygon, the arc length will intersect at few points on the square or polygon.

How to find the coordinates of the intersecting points of arc at the periphery of the square/ polygon?


The line segment of the polygon has (or hasn't) a tangent point whose distance from the center point of the arc is the arc radius.

If that is the problem then project two lines parallel to the segment on either side of the segment at a distance of radius, then determine if either line intersects arc center point, if not, no tangent exists...

if so, the point of intersection relative to the projected segment is proportional to the tangent on the original segment.


The arc will intersect those segments of the boundary, which are of distance R from the center of the arc, where R is the radius of the arc. The intersection points are the projections of the center onto the given segments.

Therefore you can find all distances from the center to the segments and find those that match the radius. Then find the projections.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜