stemflow.utils.sphere.Icosahedron
Functions for the initial icosahedron in spherical indexing system
calc_and_judge_distance(v1, v2, v3)
Determine if the three points have same distance with each other
Parameters:
-
v1(ndarray) –point 1
-
v2(ndarray) –point 1
-
v3(ndarray) –point 1
Returns:
-
bool(bool) –Whether have same pair-wise distance
Source code in stemflow/utils/sphere/Icosahedron.py
get_Icosahedron_faces()
Get icosahedron faces
Returns:
-
ndarray–np.ndarray: shape (20,3,3). (faces, point, 3d_dimension)
Source code in stemflow/utils/sphere/Icosahedron.py
get_Icosahedron_vertices()
Return the 12 vertices of icosahedron
Returns:
-
ndarray–np.ndarray: (n_vertices, 3D_coordinates)
Source code in stemflow/utils/sphere/Icosahedron.py
get_earth_Icosahedron_vertices_and_faces_3D(radius=1)
Get vertices and faces in lon, lat
Parameters:
-
radius(Union[int, float], default:1) –radius of earth in km.
Returns:
-
[ndarray, ndarray]–[np.ndarray, np.ndarray]: vertices, faces
Source code in stemflow/utils/sphere/Icosahedron.py
get_earth_Icosahedron_vertices_and_faces_lonlat()
Get vertices and faces in lon, lat
Returns:
-
[ndarray, ndarray]–[np.ndarray, np.ndarray]: vertices, faces