1 // Single Voronoi cell example code
3 // Author : Chris H. Rycroft (Harvard SEAS / LBL)
4 // Email : chr@alum.mit.edu
5 // Date : February 16th 2014
10 // This function returns a random floating point number between 0 and 1
11 double rnd() {return double(rand())/RAND_MAX
;}
14 // double x,y,z,rsq,r;
18 v
.draw_gnuplot(0,0,0,"single_cell.gnu");
20 double l
=1e-20,u
=1e-20;
21 //bool suc=v.search_upward(-1,3,0,0.5,lp,ls,l,u);
23 v
.draw_gnuplot(0,0,0,"single_cell2.gnu");
24 v
.plane(-1,3,0.4,0.53);
25 v
.plane(-1,3,-0.4,0.54);
30 // v.plane(-1,3,-0.2,0.54);
33 printf("%s lp=%d ls=%d l=%g u=%g up=%d\n",suc
?"True":"False",lp
,ls
,l
,u
,v
.up
);
35 v
.draw_gnuplot(0,0,0,"single_cell3.gnu");