Контрольная работа: Сглаженная поверхность для границы трех атомов в пространстве
printf("Y%d=",i);fscanf(f,"%d",&y[i]);printf("%d\n",y[i]);
printf("Z%d=",i);fscanf(f,"%d",&z[i]);p[i]=z[i];printf("%d\n",z[i]);
printf("R%d=",i);fscanf(f,"%d",&r[i]);printf("%d\n",r[i]);
}
Zvr=(z[1]+z[2]+z[3])/3;
Xvr=(x[1]+x[2]+x[3])/3;
R1=(sqrt((x[1]-Xvr)*(x[1]-Xvr)+(z[1]-Zvr)*(z[1]-Zvr)));
R2=(sqrt((x[2]-Xvr)*(x[2]-Xvr)+(z[2]-Zvr)*(z[2]-Zvr)));
R3=(sqrt((x[3]-Xvr)*(x[3]-Xvr)+(z[3]-Zvr)*(z[3]-Zvr)));
double x1,x2,y1,y2;
x1=x[1]-Xvr;x2=R1;y1=z[1]-Zvr;y2=0;
alp1=(x1*x2+y1*y2)/((sqrt(x1*x1+y1*y1)))/(sqrt(x2*x2+y2*y2));
al1=acos(alp1)*180/M_PI;
x1=x[2]-Xvr;x2=R2;y1=z[2]-Zvr;y2=0;
alp2=(x1*x2+y1*y2)/((sqrt(x1*x1+y1*y1)))/(sqrt(x2*x2+y2*y2));
al2=acos(alp2)*180/M_PI;
x1=x[3]-Xvr;x2=R3;y1=z[3]-Zvr;y2=0;
alp3=(x1*x2+y1*y2)/((sqrt(x1*x1+y1*y1)))/(sqrt(x2*x2+y2*y2));
al3=acos(alp3)*180/M_PI;
printf("vvedite radius bolshogo shara\n");
scanf("%d",&Rc);
initwindow (1024,860);
}
int stroim(void)
{ int i,k,j;double max;
max=p[1];
for(i=1;i<=4;i++)
{if (p[i]>=max) {max=p[i];k=i;}}
for(i=1;i<4;i++)