If i remember correctly, the algorithm is to draw a horizontal line through your test point. Count how many lines of of the polygon you intersect to reach your point.
If the answer is odd, you’re inside. If the answer is even, you’re outside.
Edit: Yeah, what he said (Wikipedia):
Related Contents:
- An algorithm for inflating/deflating (offsetting, buffering) polygons
- Sort points in clockwise order?
- How do I efficiently determine if a polygon is convex, non-convex or complex?
- What is the fastest algorithm to calculate the minimum distance between two sets of points?
- How to Compute OBB of Multiple Curves?
- Largest circle inside a non-convex polygon
- How to check if line segment intersects a rectangle?
- Shortest distance between points algorithm
- robust algorithm for surface reconstruction from 3D point cloud?
- What is the fastest way to find the closest point to a given point?
- Location of highest density on a sphere
- Find if a point is inside a convex hull for a set of points without computing the hull itself
- What does O(log n) mean exactly?
- Segmented Sieve of Eratosthenes?
- Big-O for Eight Year Olds? [duplicate]
- How do I check if a number is a palindrome?
- Is it possible to express “t” variable from Cubic Bezier Curve equation?
- Generate all unique substrings for given string
- Algorithm to generate anagrams
- Algorithm to find next greater permutation of a given string
- Finding the best trade-off point on a curve
- How to delete in a heap data structure?
- SICP example: Counting change, cannot understand
- What is dynamic programming? [closed]
- Check if one integer is an integer power of another
- How can I pair socks from a pile efficiently?
- “On-line” (iterator) algorithms for estimating statistical median, mode, skewness, kurtosis?
- How does Dijkstra’s Algorithm and A-Star compare?
- What string similarity algorithms are there?
- Find connected components in a graph [closed]
- Are there any cases where you would prefer a higher big-O time complexity algorithm over the lower one?
- How Do I Choose Between a Hash Table and a Trie (Prefix Tree)?
- Find the paths between two given nodes?
- Algorithm to find multiple string matches
- Calculate largest inscribed rectangle in a rotated rectangle
- What are the differences between segment trees, interval trees, binary indexed trees and range trees?
- Examples of Algorithms which has O(1), O(n log n) and O(log n) complexities
- Big-oh vs big-theta [duplicate]
- How to rank a million images with a crowdsourced sort
- help in the Donalds B. Johnson’s algorithm, i cannot understand the pseudo code (PART II)
- Merge sort time and space complexity
- Finding how similar two strings are
- finding a^b^c^… mod m
- Create non-intersecting polygon passing through all given points
- O(klogk) time algorithm to find kth smallest element from a binary heap
- What is the algorithm that opencv uses for finding contours?
- Find prime numbers using Scala. Help me to improve
- fitting n variable height images into 3 (similar length) column layout
- Finding height in Binary Search Tree
- Bits counting algorithm (Brian Kernighan) in an integer time complexity