Utils¶
-
medianshape.simplicial.utils.get_bbox_diagonal(mesh_points=None, bbox=None)[source]¶ Returns the diagonal of a bounding box in 2D or 3D.
-
medianshape.simplicial.utils.boundary_points(bbox)[source]¶ Returns corner points of a boundary box in which 4 corners of the bottom rectangle are the first 4 points, oriented CCW starting from (xmin, ymin, zmin). Similarly, 4 corners of the top rectangle are the last 4 points, oriented CCW starting from (xmin, ymin, zmax).
-
medianshape.simplicial.utils.get_combination(n, vals=[1, -1])[source]¶ Returns all combinations of given values for n positions.
-
medianshape.simplicial.utils.vectorize(func_str, X)[source]¶ Computes function values on X domain.
Parameters: func_str (str) – a name of a function in math module in python or a name of a function within this module (medianshape.simplicial.utils). Returns: func_values – function values on the given domain.
-
medianshape.simplicial.utils.curve1(x)[source]¶ \(f(x) = 10e^{\frac{x}{180}}\sin(\frac{1}{100}\pi x) +25\)
-
medianshape.simplicial.utils.curve2(x)[source]¶ \(f(x) = -10e^{\frac{x}{200}}\sin(\frac{1}{50}\pi x) +25\)
-
medianshape.simplicial.utils.curve3(x)[source]¶ \(f(x) = 30e^{\frac{-x}{150}}\sin(\frac{1}{50}\pi x) +20\)
-
medianshape.simplicial.utils.curve4(x)[source]¶ \(f(x) = 10e^{\frac{-x}{200}}\sin(\frac{1}{30}\pi x) +40\)