sknano.core.geometric_regions.Parallelogram.contains¶
-
Parallelogram.
contains
(point)[source][source]¶ Test region membership of point in
Parallelogram
.Parameters: point : array_like
Returns: True if point is within
Paralleogram
, False otherwiseNotes
A point (px,py) is within the bounded region of a parallelogram with origin (ox,oy) and direction vectors u=(ux,uy) and v=(vx,vy) if the following is true:
0≤(py−oy)vx+(ox−px)vyuyvx−uxvy≤1∧0≤(py−oy)ux+(ox−px)uyuxvy−uyvx≤1