update example

This commit is contained in:
Sven Oesau 2025-09-24 11:04:49 +02:00
parent d071674937
commit cf4f6b36da
1 changed files with 3 additions and 5 deletions

View File

@ -15,7 +15,6 @@ namespace PMP = CGAL::Polygon_mesh_processing;
using CP3 = CGAL::Barycentric_coordinates::Computation_policy_3; using CP3 = CGAL::Barycentric_coordinates::Computation_policy_3;
int main() { int main() {
Surface_mesh icosahedron; Surface_mesh icosahedron;
CGAL::make_icosahedron(icosahedron, Point_3(0.0, 0.0, 0.0), 2.0); CGAL::make_icosahedron(icosahedron, Point_3(0.0, 0.0, 0.0), 2.0);
PMP::triangulate_faces(faces(icosahedron), icosahedron); PMP::triangulate_faces(faces(icosahedron), icosahedron);
@ -24,7 +23,7 @@ int main(){
std::vector<Point_3> queries{ std::vector<Point_3> queries{
Point_3(-1, 1 + PHI, PHI), Point_3(0.5, (1+3*PHI)/2, PHI/2), Point_3(1, 1+PHI, -PHI), //Boundary Point_3(-1, 1 + PHI, PHI), Point_3(0.5, (1+3*PHI)/2, PHI/2), Point_3(1, 1+PHI, -PHI), //Boundary
Point_3(-1, 1, 1), Point_3(0, 0, 1), Point_3(0, 2, 1), //Interior Point_3(-1, 1, 1), Point_3(0, 0, 1), Point_3(0, 2, 1), //Interior
Point_3(0, 2*PHI, 4), Point_3(0, 3, 2*PHI), Point_3(4, 0, 0)}; //EXterior Point_3(0, 2*PHI, 4), Point_3(0, 3, 2*PHI), Point_3(4, 0, 0)}; //Exterior
std::cout << std::endl << "Discrete harmonic coordinates : " << std::endl << std::endl; std::cout << std::endl << "Discrete harmonic coordinates : " << std::endl << std::endl;
@ -32,7 +31,7 @@ int main(){
coords.clear(); coords.clear();
CGAL::Barycentric_coordinates::discrete_harmonic_coordinates_3( CGAL::Barycentric_coordinates::discrete_harmonic_coordinates_3(
icosahedron, query, std::back_inserter(coords), CP3::FAST_WITH_EDGE_CASES); icosahedron, query, std::back_inserter(coords), CP3::FAST);
// Output discrete harmonics coordinates. // Output discrete harmonics coordinates.
for (std::size_t i = 0; i < coords.size() -1; ++i) { for (std::size_t i = 0; i < coords.size() -1; ++i) {
@ -42,6 +41,5 @@ int main(){
} }
std::cout << std::endl; std::cout << std::endl;
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }