Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] lower_hull_2() problem

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] lower_hull_2() problem


Chronological Thread 
  • From: Philipp Moeller <>
  • To: Alessandro Attanasi <>
  • Cc:
  • Subject: Re: [cgal-discuss] lower_hull_2() problem
  • Date: Wed, 15 Jan 2014 22:39:39 +0100
  • Organization: GeometryFactory

Alessandro Attanasi
<>
writes:

> anyhow I found another strange behaviour, I computed lower and upper hull,
> but I obtained the same results. Points are the same I described in the
> previous email, and the code I used to compute the lower and upper
> hull are

You call lower_hull_points_2 twice.

>
> std::vector<K::Point_2>lower_hull;
>
> CGAL::lower_hull_points_2( points_vect.begin(), points_vect.end(),
> std::back_inserter(lower_hull) );
>
> ch_points = lower_hull.size();
>
> std::cout << "6) Points on the lower hull = " << ch_points << std::endl;
>
> for(int i = 0; i < ch_points; i++)
>
> {
>
> std::cout << lower_hull[i] << std::endl;
>
> }
>
>
> std::vector<K::Point_2>upper_hull;
>
> CGAL::lower_hull_points_2( points_vect.begin(), points_vect.end(),
> std::back_inserter(upper_hull) );
^^^^^^^^^^^^^^^^^^^^

This should be upper_hull_points_2.

>
> ch_points = upper_hull.size();
>
> std::cout << "7) Points on the upper hull = " << ch_points << std::endl;
>
> for(int i = 0; i < ch_points; i++)
>
> {
>
> std::cout << upper_hull[i] << std::endl;
>
> }
>
> obtaining in both cases the same result:
>
> 6) Points on the lower hull = 2
> 0 0
> 4 0
>
> 7) Points on the upper hull = 2
> 0 0
> 4 0



Archive powered by MHonArc 2.6.18.

Top of Page