#ifndef CGAL_USE_QT
#include <iostream>
int main(int, char*){
  std::cout << "Sorry, this demo needs QT..." << std::endl; return 0;}
#else
#include <iostream>
#include <vector>
#include <CGAL/Cartesian.h>
#include <CGAL/Point_3.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Triangulation_hierarchy_3.h>
#include <CGAL/Random.h>
#include <qapplication.h>
#include <CGAL/Timer.h>


typedef float                               Number_type;
typedef CGAL::Cartesian<Number_type>        K;







typedef CGAL::Point_3<K> 		    Point;
typedef CGAL::Triangulation_vertex_base_3<K>             Vbb;
typedef CGAL::Triangulation_hierarchy_vertex_base_3<Vbb> Vb;
typedef CGAL::Triangulation_cell_base_3<K>               Cb;
typedef CGAL::Triangulation_data_structure_3<Vb,Cb>      Tds;
typedef CGAL::Delaunay_triangulation_3<K,Tds>            Dt;
typedef CGAL::Triangulation_hierarchy_3<Dt>              Delaunay;



int main( int argc, char **argv )
{
    int Nb_points;
    CGAL::Timer cost;cost.reset();cost.start();


    std::cout<<" Nombre de points ? "<<std::endl;
    std::cin>>Nb_points;
    CGAL::Random random(0);

    Delaunay dt1;  


    for( int i = 0 ; i<Nb_points;++i) {

      Number_type x = random.get_double();
      Number_type y = x*x;
      Number_type z = x*x*x;

      dt1.insert( Point( x, y, z ) );
      std::cout<<"\b\b\b\b\b\b\b\b\b"<<i<<" ";
    }
    std::cout<<std::endl<<Nb_points<<" points triangules en "
             <<cost.time()<<" secondes"<<std::endl;


}
#endif
