Check of point inside/outside polygon
Gorge Jingale via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jul 26 13:18:53 PDT 2016
On Tuesday, 26 July 2016 at 19:08:09 UTC, H. S. Teoh wrote:
> On Tue, Jul 26, 2016 at 06:39:58PM +0000, Gorge Jingale via
> Digitalmars-d-learn wrote:
>> On Tuesday, 26 July 2016 at 17:38:43 UTC, Suliman wrote:
>> > I have arbitrary polygon. I need any solution. Performance
>> > is does not matter at current moment.
>>
>> A polygon is made up of lines. For a point to be inside a
>> convex polygon, it must be to the "right" of all the lines
>> with clockwise orientation.
> [...]
>
> Unfortunately he wants to handle arbitrary polygons that are
> not necessarily convex.
>
>
> T
The example was for convex, the method using intersections was
for general polygons that do not have self-intersections. Convex
polygons have 0 intersection numbers.
More information about the Digitalmars-d-learn
mailing list