Spatial documentation¶
-
peripy.spatial.
euclid
()¶ Calculate the Euclidean distance between two, three-dimensional coordinates.
Parameters: - r1 (
numpy.ndarray
) – A (3,) array representing the first coordinate. - r2 (
numpy.ndarray
) – A (3,) array representing the second coordinate.
Returns: The Euclidean distance between r1 and r2
Return type: numpy.float64
- r1 (
-
peripy.spatial.
strain
()¶ Calculate the strain between two particles given their current and initial positions.
Parameters: - r1 (
numpy.ndarray
) – A (3,) array giving the coordinate of the first particle. - r2 (
numpy.ndarray
) – A (3,) array giving the coordinate of the second particle. - r10 (
numpy.ndarray
) – A (3,) array giving the initial coordinate of the first particle. - r20 (
numpy.ndarray
) – A (3,) array giving the initial coordinate of the second particle.
Returns: The strain.
Return type: numpy.float64
- r1 (
-
peripy.spatial.
strain2
()¶ Calculate the strain between two particles given their current distance and initial positions.
Parameters: - l (numpy.float64) – The Euclidean distance between the two particles.
- r10 (
numpy.ndarray
) – A (3,) array giving the initial coordinate of the first particle. - r20 (
numpy.ndarray
) – A (3,) array giving the initial coordinate of the second particle.
Returns: The strain.
Return type: numpy.float64