pypdevsbbl.extra.spatial module

This file contains additional classes w.r.t. spatial properties.

Such properties include: - Coordinates - Distance computation - Multiple axes movement

class pypdevsbbl.extra.spatial.Coordinate(x, y, z)[source]

Bases: object

Simple 3-dimensional coordinate.

A coordinate in 3D will follow a cartesian coorinate system over 3 axes: x, y and z.

Parameters:
  • x (numeric) – The x-value of the coordinate.
  • y (numeric) – The y-value of the coordinate.
  • z (numeric) – The z-value of the coordinate.
class pypdevsbbl.extra.spatial.distance[source]

Bases: object

Compute the distance between two points.

static euclidean(A, B)[source]

Computes the Euclidean distance between A and B.

Parameters:
static manhattan(A, B)[source]

Computes the Manhattan distance between A and B.

Parameters:
static chebyshev(A, B)[source]

Computes the Chebyshev distance between A and B.

Parameters:
static minkowski(A, B, p=2)[source]

Computes the Minkowski distance between A and B.

Parameters:
  • A (Coordinate) – The first coordinate.
  • B (Coordinate) – The second coordinate.
  • p (int) – The order of the distance. Must be greater than or equal to 1. Defaults to 2 (= euclidean()).