Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Inserting random spheres into Delaunay triangulations

Subject: CGAL users discussion list

List archive

[cgal-discuss] Inserting random spheres into Delaunay triangulations


Chronological Thread 
  • From: Adam Getchell <>
  • To:
  • Subject: [cgal-discuss] Inserting random spheres into Delaunay triangulations
  • Date: Tue, 28 Oct 2014 21:24:50 -0700

Hello all,

I’m created nested spheres of random points (where each sphere of differing radius represents a timeslice) that I’d like to triangulate.

I’m very close, but I’m not quite there:

inline void make_S3_triangulation(Delaunay* D3, int simplices, int timeslices) {
  // std::cout << "make_S3_triangulation() called " << std::endl;
  const int points = simplices * 4;
  const double radius = 1;
  const bool message = false;

  std::vector<Scd::Point_3> vertices;

  make_3_sphere(&vertices, points, radius, message);
  //D3->insert(vertices.begin(), vertices.end());
  for (auto point : *vertices)
    {
      D3->insert(point);
    }
}

Gives me this compiler error:

Scanning dependencies of target cdt
[ 14%] Building CXX object CMakeFiles/cdt.dir/src/cdt.cpp.o
In file included from /Users/adam/CDT-plusplus/src/cdt.cpp:24:
/Users/adam/CDT-plusplus/src/S3Triangulation.h:49:21: error: indirection
      requires pointer operand ('std::vector<Scd::Point_3>' invalid)
  for (auto point : *vertices)
                    ^~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/cdt.dir/src/cdt.cpp.o] Error 1
make[1]: *** [CMakeFiles/cdt.dir/all] Error 2
make: *** [all] Error 2

The relevant code is:

https://github.com/acgetchell/CDT-plusplus/blob/master/unittests/Triangulated2SphereTest.cpp

Which calls:

https://github.com/acgetchell/CDT-plusplus/blob/master/src/S3Triangulation.h (offending lines commented out so everything else compiles)

Which calls:

https://github.com/acgetchell/CDT-plusplus/blob/master/src/Sphere_3.h

Pointers (or iterators) welcome!





Archive powered by MHonArc 2.6.18.

Top of Page