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: x : numeric
y : numeric
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: p : misc.XYPoint
movement vector
Returns: dist : float
distance to other point p
-
is_inside_polygon
(point_list)¶ Return true if point is inside a given polygon.
Parameters: point_list : list
point list defining the polygon
Returns: check : bool
-
move
(v)¶ Move the point along the coodinates specified by the vector v.
Parameters: v : misc.XYPoint
movement vector
-
rotate
(degree, rotation_centre=(0, 0))¶ Rotate the point counterclockwise in degree around rotation_centre.
Parameters: degree : int
degree of rotation (default=(0, 0) )
rotation_center : (numeric, numeric)
rotation center (x, y)
-
x
¶ Getter for x
-
y
¶ Getter for y
-