int main() { while(scanf("%d",&hull.n)==1) { for(int i=0;i<hull.n;i++) { scanf("%lf%lf%lf",&hull.P[i].x,&hull.P[i].y,&hull.P[i].z); } hull.create(); printf("%d\n",hull.polygon()); } return 0; }
int main() { int i; double res; while(scanf("%d",&hull.n)!=EOF) { for(i=0;i<hull.n;i++) scanf("%lf%lf%lf", &hull.P[i].x, &hull.P[i].y, &hull.P[i].z); hull.solve(); res=hull.area(); printf("%.3lf\n",res); } return 0; }
int main() { while(1) { scanf("%d",&hull.n); if (hull.n == 0) break; for(int i=0;i<hull.n;i++) { scanf("%lf%lf%lf",&hull.P[i].x,&hull.P[i].y,&hull.P[i].z); } hull.create(); printf("%.0f\n",hull.area()); } return 0; }
int main() { int i, n; double num1, num2; while (scanf("%d", &n) != EOF) { CH3D hull; memset(g, 0, sizeof(g)); memset(hull.P, 0, sizeof(hull.P)); hull.n = n; for (i = 0; i < hull.n; i++) { scanf("%lf%lf%lf", &hull.P[i].x, &hull.P[i].y, &hull.P[i].z); } hull.pretreat(); Point temp = hull.getcent(); num1 = hull.function(temp); printf("%.3lf\n", num1); } return 0; }
int main() { while(scanf("%d",&hull.n)==1) { for(int i=0;i<hull.n;i++) { scanf("%lf%lf%lf",&hull.P[i].x,&hull.P[i].y,&hull.P[i].z); } hull.create(); Point p=hull.barycenter(); double minn=1e20; for(int i=0;i<hull.num;i++) { minn=min(minn,hull.ptoface(p,i)); } printf("%.3lf\n",minn); } return 0; }