oceanspy.utils.cartesian_path

oceanspy.utils.cartesian_path(x1, y1, x2, y2, delta=None)[source]

Generate a trajectory specifying the distance resolution.

Parameters:
x1: scalar

x coordinate of vertex 1

y1: scalar

y coordinate of vertex 1

x2: scalar

x coordinate of vertex 2

y2: scalar

y coordinate of vertex 2

delta: scalar

Distance resolution (same units of x and y) If None, only use vertices and return distance

Returns
——-
xs: 1D numpy.ndarray

x coordinates

ys: 1D numpy.ndarray

y coordinates

dist: 1D numpy.ndarray

distances