Standing magnifying glass with lightfor reading

Where I would like the red line to fail because it is "outside" and the green line to succeed as it is well within the polygon.

magnifying glass with lightand stand, 10x

For the first one, I'm not sure the answer is quite right. It might be, in which case if someone could clarify or provide a proof that would be great. For the projection method in the second question it obviously fails because both red and green lines fall under the degenerate case. The intersection count method has the same problem, as both red and green lines intersect twice (or none, depending on your definition).

I'm trying to find an efficient test/algorithm that can determine if any line segment between two vertices in a simple, concave polygon contains points that lie outside the domain of the polygon. I haven't had much luck in my endeavor though. The basic idea is illustrated in the below picture:

Standing magnifying glass with lightnearby

Vision Forward stand magnifiers are placed directly on the reading surface and a good option for people with limited hand strength. Once you’ve placed the magnifier on your reading material, simply move it from side to side as you read. Bright LED lighting helps illuminate the text as you read it. The stand magnifiers are available in ten powers, from 3X through 14X. A case is included. Uses three AA batteries (not included).

Standing magnifying glass with lightwalmart

I think the key is to, for the line segment in question, find any point along its length such that it lies outside the polygon's domain. This would be true for even the most convoluted, simple, concave polygon. The trick is finding that point either very fast or with some linear algebra that I've yet to encounter.

Magnifiers are available in different powers. Bear in mind, the stronger the magnifier is, the smaller the lens will be. This means that you are able to read less efficiently with higher powered magnifiers. Different magnifiers are suitable for different tasks, and it is recommended that you try a magnifier before purchasing. You can call our store at 414-615-0111 for more information.

Disclaimer: this is modified from a question on stackoverflow (https://stackoverflow.com/q/66374077/12135804) and posted here. My justification is it felt appropriate, being both a geometry problem and an algorithm problem. I tried to follow guidelines here: https://meta.stackexchange.com/a/75012. I apologize if anyone disagrees and this violates any rules.

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

All content © 2024  Vision Forward 912 N. Hawley Road  |  Milwaukee, WI 53213  |  414-615-0100  |  Toll Free 1-855-878-6056