|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Power diagram (weighted Voronoi diagram). More...
#include <geom_algorithms.H>
Classes | |
| struct | PowerCell |
| Represents a cell in the power diagram. More... | |
| struct | PowerEdge |
| Represents an edge in the power diagram. More... | |
| struct | Result |
| Complete result of a power diagram computation. More... | |
| struct | WeightedSite |
| A site with an associated weight (squared radius). More... | |
Public Member Functions | |
| Result | operator() (const Array< WeightedSite > &sites) const |
| Compute the power diagram. | |
Static Public Member Functions | |
| static Point | power_center (const WeightedSite &a, const WeightedSite &b, const WeightedSite &c) |
| Compute the power center of three weighted sites. | |
Power diagram (weighted Voronoi diagram).
Each site sᵢ has a weight wᵢ. The power distance from a point p to site sᵢ is ||p - sᵢ||² − wᵢ.
The power diagram partitions the plane into cells where each cell contains points closer (in power distance) to one site than to all others.
RegularTriangulationBowyerWatson, which uses the power test (weighted in-circle predicate) to determine triangulation connectivity.Let T be the number of triangles in the regular triangulation.
When all weights are equal this reduces to the standard Voronoi diagram.
Definition at line 10907 of file geom_algorithms.H.
|
inline |
Compute the power diagram.
Uses the regular triangulation (weighted Delaunay) so that the triangulation connectivity correctly reflects the site weights.
| sites | Weighted point set. |
Definition at line 11001 of file geom_algorithms.H.
References Aleph::divide_and_conquer_partition_dp(), Aleph::GeomTriangleAdjacencyUtils::for_each_sorted_edge_group(), power_center(), Aleph::Array< T >::reserve(), Aleph::PowerDiagram::PowerEdge::site_u, and Aleph::Array< T >::size().
|
inlinestatic |
Compute the power center of three weighted sites.
The power center is equidistant in power distance to all three sites.
Definition at line 10961 of file geom_algorithms.H.
References ah_domain_error_if, Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), Aleph::Point::get_y(), Aleph::PowerDiagram::WeightedSite::position, and Aleph::PowerDiagram::WeightedSite::weight.
Referenced by operator()(), TEST_F(), and TEST_F().