NetDEM v1.0
|
Class for computing Voronoi diagrams on a sphere. More...
#include <spherical_voronoi.hpp>
Static Public Member Functions | |
static std::tuple< VecXT< Vec3d >, VecXT< VecXT< int > > > | Solve (VecXT< Vec3d > const &vt_seeds) |
Compute the Voronoi diagram for a set of seeds with uniform weights. | |
static std::tuple< VecXT< Vec3d >, VecXT< VecXT< int > > > | Solve (VecXT< Vec3d > const &vt_seeds, VecXT< double > const &vt_weights) |
Compute the Voronoi diagram for a set of seeds with arbitrary weights. | |
static VecXT< Vec3d > | Solve (int num_seeds, int max_iter=10000, double tol=1.0e-4) |
Compute a centroidal Voronoi tessellation. | |
static VecXT< Vec3d > | Solve (int num_seeds, VecXT< double > const &weights_sh_coff, int max_iter, double tol) |
Compute a spherical harmonic weighted centroidal Voronoi tessellation. | |
static void | SaveAsVTK (std::string const &file, VecXT< Vec3d > const &vt_nodes, VecXT< VecXT< int > > const &vt_cells, VecXT< Vec3d > const &vt_seeds) |
Save the Voronoi diagram as a VTK file. | |
Class for computing Voronoi diagrams on a sphere.
This class provides methods for computing Voronoi diagrams on the surface of a sphere. It can solve basic, weighted, and centroidal Voronoi problems, and provides methods for saving the resulting Voronoi mesh as a VTK file for visualization.
|
static |
Compute a centroidal Voronoi tessellation.
This method computes a centroidal Voronoi tessellation (CVT) with the specified number of seed points. It returns the resulting seed points.
num_seeds | The number of seed points to generate. |
max_iter | The maximum number of iterations to perform. |
tol | The convergence tolerance for the CVT algorithm. |
|
static |
Compute a spherical harmonic weighted centroidal Voronoi tessellation.
assuming the weights are interplated from a spheircal harmonics function
This method computes a spherical harmonic weighted centroidal Voronoi tessellation (SHCVT) with the specified number of seed points and spherical harmonic coefficients. It returns the resulting seed points.
num_seeds | The number of seed points to generate. |
weights_sh_coff | The spherical harmonic coefficients for the weights. |
max_iter | The maximum number of iterations to perform. |
tol | The convergence tolerance for the SHCVT algorithm. |
|
static |
Compute the Voronoi diagram for a set of seeds with uniform weights.
This method computes the Voronoi diagram for a set of seed points with uniform weights. It returns the Voronoi vertices and cells as two arrays.
vt_seeds | The input seed points. |
|
static |
Compute the Voronoi diagram for a set of seeds with arbitrary weights.
This method computes the Voronoi diagram for a set of seed points with arbitrary weights. It returns the Voronoi vertices and cells as two arrays.
vt_seeds | The input seed points. |
vt_weights | The input weights for each seed point. |