• Advertisement
Sign in to follow this  

Intersection between a line and a piece of pie

This topic is 4314 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sorry for the corny subject, but I can't think of the technical name for a segment of a circle, like a slice of pie. But my problem is that I need an intersect function between a line and a segment of a circle starting at the origin. Eg, A segment of 120 degrees and given radius, and a definite line. if anyone has any ideas, pls let me know. Thanks

Share this post


Link to post
Share on other sites
Advertisement
The first step will of course be to find the intersection points, if any, between the line and the full circle (the algorithm for this is easy to find online).

How you proceed from there may depend partly on whether the 'wedge' can ever have an angle > 180 degrees (that is, it includes more than half of the circle). In any case, at this point you need to determine if the point(s) of intersection lie on the arc of the wedge, which can be done by testing it against the hyperplanes making up the edges of the wedge (if the wedge angle is < 180), or by computing and comparing angles. Note that I'm assuming here that you're only concerned with intersecting the line with the arc, not with the line segments that make up the edges of the wedge.

If you need more detailed info, perhaps you could clarify this latter point, as well as whether the arc angle will ever be > 180 degrees.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement