The geometry module.
This module contains miscellaneous geometry functions for expyriment.
The Expyriment point class
Methods
Return euclidian distance to the points (p).
| Parameters : | p : misc.XYPoint
|
|---|---|
| Returns : | dist : float
|
Return true if point is inside a given polygon.
| Parameters : | point_list : list
|
|---|---|
| Returns : | check : bool |
Move the point along the coodinates specified by the vector v.
| Parameters : | v : misc.XYPoint
|
|---|
Convert a coordinate on the screen to an expyriment position.
| Parameters : | coordinate : (int, int)
|
|---|---|
| Returns : | coordinate : (int, int) |
Return true if two line segments are intersecting
| Parameters : | pa : misc.XYPoint
pb : misc.XYPoint
pc : misc.XYPoint
pb : misc.XYPoint
|
|---|---|
| Returns : | check : bool
|
Returns vertex representation of the points (int, int) in xy-coordinates
| Parameters : | points : (int, int)
|
|---|---|
| Returns : | vtx : list
|
Convert an expyriment position to a coordinate on screen.
| Parameters : | coordinate : (int, int)
|
|---|---|
| Returns : | coordinate : (int, int) |
Convert an expyriment position (pixel) to a visual angle from center.
| Parameters : | position : (int, int)
viewing_distance : numeric
monitior_size : numeric
|
|---|---|
| Returns : | angle : (float, float)
|
Convert an position defined as visual angle from center to expyriment position (pixel).
| Parameters : | visual_angle : (numeric, numeric)
viewing_distance : numeric
monitior_size : (numeric, numeric)
|
|---|---|
| Returns : | position : (float, float)
|
Convert a coordinate on the screen to an expyriment position.
| Parameters : | coordinate : (int, int)
|
|---|---|
| Returns : | coordinate : (int, int) |
Return true if two line segments are intersecting
| Parameters : | pa : misc.XYPoint
pb : misc.XYPoint
pc : misc.XYPoint
pb : misc.XYPoint
|
|---|---|
| Returns : | check : bool
|
Returns vertex representation of the points (int, int) in xy-coordinates
| Parameters : | points : (int, int)
|
|---|---|
| Returns : | vtx : list
|
Convert an expyriment position to a coordinate on screen.
| Parameters : | coordinate : (int, int)
|
|---|---|
| Returns : | coordinate : (int, int) |
Convert an expyriment position (pixel) to a visual angle from center.
| Parameters : | position : (int, int)
viewing_distance : numeric
monitior_size : numeric
|
|---|---|
| Returns : | angle : (float, float)
|
Convert an position defined as visual angle from center to expyriment position (pixel).
| Parameters : | visual_angle : (numeric, numeric)
viewing_distance : numeric
monitior_size : (numeric, numeric)
|
|---|---|
| Returns : | position : (float, float)
|