Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Hyperplane_d

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Hyperplane_d


Chronological Thread 
  • From: Marc Glisse <>
  • To: "" <>
  • Subject: Re: [cgal-discuss] Hyperplane_d
  • Date: Wed, 16 Sep 2015 14:24:57 +0200 (CEST)

On Wed, 16 Sep 2015, Scherrer Daniel wrote:

Is there any example on how to use CGAL::Hyperplane_d?

I tried to compute the orthogonal vector, first with:
typedef CGAL::Simple_cartesian<double> K;
typedef K::Point_3 Point;
typedef K::Vector_3 Vector;
Vector v = CGAL::orthogonal_vector(Point(0,0,0), Point(1,0,2),
Point(0,1,0));
This gives v = [-2,0,1], which seams OK.
Then I tried the same using a Hyperplane:
typedef CGAL::Epick_d<CGAL::Dimension_tag<3>> K;
typedef K::Point_d Point;
typedef K::Vector_d Vector;
typedef K::Hyperplane_d Plane;
std::vector<Point> points(3);
...
Plane plane(points.begin(), points.end());
Vector v = plane.orthogonal_vector();
This gives v = [0,1,0.5], which seams to be wrong.

There was a bug with hyperplanes containing the origin, I think it was fixed:
https://github.com/CGAL/cgal/commit/b8503f3788c42b5938ae300d3c62251b666a278d
You could try version 4.7-beta1 which I hope has the fix.
Please let us know if it still fails.

--
Marc Glisse



Archive powered by MHonArc 2.6.18.

Top of Page