I am looking for an algorithm through I can create a geofence and check if a device is entering/leaving the fence. I have looked at point in polygon algorithms (ray casting and winding number) but are there any algorithms which can be applied to circle and any irregular shapes as well? The important constraint is time efficiency.
Thank you.
Here is the c code algorithm that is simple to understand: