35 #include "../voro++-0.4.6/src/voro++.hh"
47 double cvol = (x_max - x_min) * (y_max - y_min) * (x_max - x_min);
50 int n_x= 6, n_y= 6, n_z= 6;
53 voro::container con(x_min, x_max, y_min, y_max, z_min, z_max, n_x, n_y, n_z,
false,
false,
false, 8);
65 double vvol = con.sum_cell_volumes();
67 sprintf(message,
" Volume de l'echantillon = %lf",cvol);
69 voro::voronoicell voro_cell;
70 voro::c_loop_all loop(con);
72 if(loop.start())
do nb++;
while(loop.inc());
73 sprintf(message,
" Nombre de cellules de Voronoi = %d",nb);
75 sprintf(message,
" Volume des cellules de Voronoi = %lf",vvol);
83 if(loop.start())
do if(con.compute_cell(voro_cell,loop))
90 std::vector< double > vert_xyz;
91 voro_cell.vertices(x, y, z, vert_xyz);
93 for(
int i=0; i < vert_xyz.size(); i+=3)
95 static int numeronoeud=0;
102 std::vector< int > face_vert;
103 voro_cell.face_vertices(face_vert);
105 for(
int i=0; i < face_vert.size(); i++)
108 int nbVert = face_vert[i];
109 for(
int j=i+1; j < i+nbVert+1; j++)
116 }
while (loop.inc());
135 BOITE_3D boiteenglobante(x_min,y_min,z_min,x_max,y_max,z_max);
137 int nb=pow(
list_points.size(),0.333333333333333333)+1;
157 if (nd->est_fusionne()==
false)
164 grille.
rechercher(xyz[0],xyz[1],xyz[2],eps,liste_entite_trouve);
167 if (nd2->est_fusionne()==
false)
170 xyz2[0]=nd2->get_x();
171 xyz2[1]=nd2->get_y();
172 xyz2[2]=nd2->get_z();
179 nd2->active_fusion();
180 nd2->change_maitre_fusion(nd);
186 nd->change_maitre_fusion(nd);
232 double xyz1[3],xyz2[3];
233 xyz1[0]=nd1->
get_x();
234 xyz1[1]=nd1->
get_y();
235 xyz1[2]=nd1->
get_z();
236 xyz2[0]=nd2->
get_x();
237 xyz2[1]=nd2->
get_y();
238 xyz2[2]=nd2->
get_z();
253 std::vector<int> lstnewface;
259 while (aretes[num]==0)
277 lstnewface.push_back(numlastfus);
278 lstnewface.push_back(numfus);
279 lstnewface.push_back(numnextfus);
295 for (
int i=0;i<lstnewface.size();i=i+3)