expyriment.misc.geometry.XYPoint¶
-
class
expyriment.misc.geometry.
XYPoint
(x=None, y=None, xy=None)¶ The Expyriment point class
-
__init__
(x=None, y=None, xy=None)¶ Initialize a XYPoint.
Parameters: - xnumeric
- ynumeric
- xy(numeric, numeric)
xy = (x,y)
Notes
use x, y values (two numberic) or the tuple xy=(x,y)
-
distance
(p)¶ Return euclidian distance to the points (p).
Parameters: - pmisc.XYPoint
movement vector
Returns: - distfloat
distance to other point p
-
is_inside_polygon
(point_list)¶ Return true if point is inside a given polygon.
Parameters: - point_listlist
point list defining the polygon
Returns: - checkbool
-
move
(v)¶ Move the point along the coordinates specified by the vector v.
Parameters: - vmisc.XYPoint
movement vector
-
property
polar
¶ Getter for polar coordinate the point
-
rotate
(degree, rotation_centre=(0, 0))¶ Rotate the point counterclockwise in degree around rotation_centre.
Parameters: - degreeint
degree of rotation (default=(0, 0) )
- rotation_center(numeric, numeric)
rotation center (x, y)
-
property
tuple
¶ Getter for the tuple (x, y)
-
property
x
¶ Getter for x
-
property
y
¶ Getter for y
-