答案 0 :(得分:9)
GeometricalPredicates包有inpolygon
:https://github.com/JuliaGeometry/GeometricalPredicates.jl
答案 1 :(得分:3)
您还可以调查Luxor.jl:
using Luxor
p1 = Point(0, 0)
p2 = Point(10, 0)
p3 = Point(10, 10)
p4 = Point(0, 10)
isinside(Point(5, 5), [p1, p2, p3, p4]) # true
isinside(Point(15, 5), [p1, p2, p3, p4]) # false
但请务必检查顶点和边缘异常......
答案 2 :(得分:0)