slam.generate_parametric_surfaces

Functions

adaptive_sampling(ymax, K, step)

sample [-ymax,ymax] such as:

compute_all_principal_directions(K, vertices)

Compute all the principal directions of a quadric surface defined through the input K and sampled points vertices in a local basis :param K: (2,) array such as z(x,y)=K[0]*x**2 + K[1]*y**2 :param vertices: (n,3) coordinates of the quadric.

compute_all_principal_directions_3D(K, vertices)

Compute all the principal directions of a quadric surface defined through the input K and sampled points vertices in 3D :param K: (2,) array such as z(x,y)=K[0]*x**2 + K[1]*y**2 :param vertices: (n,3) coordinates of the quadric.

compute_local_basis(K, x, y)

Compute the local basis of the tangent plane for the quadric z(x,y)=K[0]*x**2+K[1]*y**2 :param K: (2,) array such as z(x,y)=K[0]*x**2 + K[1]*y**2 :param x: x coordinate where to compute the matrix :param y: y coordinate where to compute the matrix :return: a 2-list of (3,1) vectors, obtained as d (x,y,z(x,y) /dx and d (x,y,z(x,y) /dy

compute_principal_directions(K, x, y)

Compute the principal direction of a quadric, obtained as eigenvectors of the Weingarten matrix :param K: (2,) array such as z(x,y)=K[0]*x**2 + K[1]*y**2 :param x: x coordinate where to compute the matrix :param y: y coordinate where to compute the matrix :return: a 2-list of (2,1) vectors, i.e. principal directions ordered with Kmin,Kmax respectively.

compute_weingarten_map(K, x, y)

compute the weingarten matrix of a quadric depending on x and y coordinates :param K: (2,) array such as z(x,y)=K[0]*x**2 + K[1]*y**2 :param (x,y): coordinates where to compute the matrix :return: (2,2) matrix of the weingarten endomorphism to be evaluated at (x,y)

generate_ellipsiod(a, b, nstep[, ...])

generate an ellipsoid :param a: :param b: :param nstep: :param random_sampling: :return:

generate_hinge([n_hinge, n_step, min_coord, ...])

Generate a hinge shaped surface :param n_hinge: :param n_step: :param min_coord: :param max_coord: :param regularity: :return:

generate_paraboloid_regular(A[, nstep, ax, ...])

generate a regular paraboloid mesh Z=K*Y^2 ratio and random_distribution_type parameters are unused if random_sampling is set to False :param A: amplitude of the paraboloid :param nstep: nstepx or the sampling step stepx as a float ! :param ax: half length of the domain :param ay: half width of the domain :param random_sampling: :param random_distribution_type: :param ratio: :return:

generate_quadric(K[, nstep, equilateral, ...])

generate a quadric mesh Z=K1*X^2 + K2*Y^2 ratio and random_distribution_type parameters are unused if random_sampling is set to False :param K: list with [K1,K2] :param nstep: list with [nstepx,nstepy] or the sampling steps [stepx,stepy] as floats ! :param equilateral: to have an equilateral sampling scheme of the quadric :param ax: half length of the domain :param ay: half width of the domain :param random_sampling: :param ratio: :param random_distribution_type: :return:

generate_sphere_icosahedron([subdivisions, ...])

generate a sphere by subdividing an icosahedron simply call the trimesh function see trimesh.creation.icosphere for more details :param subdivisions: int How many times to subdivide the mesh. Note that the number of faces will grow as function of 4 ** subdivisions, so you probably want to keep this under ~5 :param radius: float Desired radius of sphere :return:.

generate_sphere_random_sampling([...])

generate a sphere with random sampling :param vertex_number: number of vertices in the output spherical mesh :param radius: radius of the output sphere :return:

quadric(K1, K2)

compute the Z coordinate of a quadric depending on X and Y coordinates :param K1: :param K2: :return:

quadric_curv_gauss(K)

analytical Gaussian curvature of a quadric :param K1: :param K2: :return:

quadric_curv_mean(K)

analytical mean curvature of a quadric :param K1: :param K2: :return:

tri_from_hull(vertices)

compute faces from vertices using trimesh convex hull :param vertices: (n, 3) float :return: