Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Why this simple code hang my machine ?

Subject: CGAL users discussion list

List archive

[cgal-discuss] Why this simple code hang my machine ?


Chronological Thread 
  • From: "Chaman Singh Verma" <>
  • To: cgal-discuss <>
  • Subject: [cgal-discuss] Why this simple code hang my machine ?
  • Date: Sat, 29 Nov 2008 14:01:00 +0530
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=K6Y1V5vsWIuqqqgCMjdVsdvRzOehWt+MBZSUK6AJvqKAZZ91TdsHbZI4B5NAN8CgJj IgjzaMu/bAUGdBPslWbTzZ8QXoxbKMR0NlL5ieR8OXz1ckgHPNFIANFdRaKF2X+/CUC4 bKZB0ALSBpBPyM7b9bQjD3k+U+L3H6DD6oO0k=

Hello,

I have modify the example code of Convex3D and it just keep on running till my machine hangs ?

Thanks.
csv



#include <CGAL/Homogeneous.h>
#include <CGAL/Cartesian.h>
#include <CGAL/point_generators_3.h>
#include <CGAL/copy_n.h>
#include <CGAL/Convex_hull_traits_3.h>
#include <CGAL/convex_hull_3.h>
#include <vector>

typedef  CGAL::Cartesian<double>  K;
typedef CGAL::Convex_hull_traits_3<K>   Traits;
typedef Traits::Polyhedron_3            Polyhedron_3;
typedef K::Segment_3                    Segment_3;
typedef K::Point_3                      Point_3;
typedef CGAL::Creator_uniform_3<double, Point_3>  PointCreator;

int main()
{
  CGAL::Random_points_in_sphere_3<Point_3, PointCreator> gen(100.0);

  std::vector<Point_3> points;
  CGAL::copy_n( gen, 250, std::back_inserter(points) );

  CGAL::Object ch_object;

  CGAL::convex_hull_3(points.begin(), points.end(), ch_object);

  Segment_3 segment;
  Polyhedron_3 polyhedron;
  if ( CGAL::assign(segment, ch_object) )
     std::cout << "convex hull is a segment " << std::endl;
  else if ( CGAL::assign (polyhedron, ch_object) )
     std::cout << "convex hull is a polyhedron " << std::endl;
  else
     std::cout << "convex hull error!" << std::endl;

  return 0;
}



Archive powered by MHonArc 2.6.16.

Top of Page