Usage Pipeline
This section describes the typical workflow for using the SurfaceGrid class.
Initialization
The SurfaceGrid class can be initialized with various parameters to create different types of grids:
Rectangular Grid
Triangular Grid
Hexagonal Grid
Cellular Grid
Spherical Grid
Getter Methods
The SurfaceGrid class provides several methods to access and calculate surface properties:
get_face_coords() - Get coordinates of faces
get_face_idxs() - Get face indices
get_face_normals() - Calculate face normals
get_face_centers() - Calculate face centers
get_info() - Get grid information
get_noise() - Get noise values
get_coords() - Get coordinate arrays
Data Structure
The surface data is organized into:
2D coordinate arrays (x, y)
3D noise array
Surface faces (triangles or polygons)
Visualization
The SurfaceGrid class provides several visualization methods:
2D Visualization - show_faces() with mode=”2D” - show_triangles() with mode=”2D”
3D Visualization - show_faces() with mode=”3D” - show_triangles() with mode=”3D”
Custom Visualization - Use get_face_coords() and get_face_normals() for custom visualization - Support for matplotlib and plotly backends