miv_simulator.geometry.rbf_surface#

Implements a parametric surface as a tuple of RBF instances, one for u and v. Based on code from bspline_surface.py

Functions

cartesian_product(arrays[, out])

Generate a cartesian product of input arrays.

euclidean_distance(a, b)

Row-wise euclidean distance.

test_point_distance()

test_surface(u, v, l)

test_uv_isospline()

Classes

RBFSurface(u, v, xyz[, order, basis])

miv_simulator.geometry.rbf_surface.euclidean_distance(a, b)[source]#

Row-wise euclidean distance. a, b are row vectors of points.

miv_simulator.geometry.rbf_surface.cartesian_product(arrays, out=None)[source]#

Generate a cartesian product of input arrays.

Parameters:
arrayslist of array-like

1-D arrays to form the cartesian product of.

outndarray

Array to place the cartesian product in.

Returns:
outndarray

2-D array of shape (M, len(arrays)) containing cartesian products formed of input arrays.

Examples

>>> cartesian(([1, 2, 3], [4, 5], [6, 7]))
array([[1, 4, 6],
       [1, 4, 7],
       [1, 5, 6],
       [1, 5, 7],
       [2, 4, 6],
       [2, 4, 7],
       [2, 5, 6],
       [2, 5, 7],
       [3, 4, 6],
       [3, 4, 7],
       [3, 5, 6],
       [3, 5, 7]])