#include<iostream> #include<math.h> using namespace std; struct Point { double x; double y; }; const double PI=3.141592653589793; //(B-A)X(C-A) double Cross(const Point & A,const Point & B,const Point & C) { return (B.x-A.x)*(C.y-A.y)-(C.x-A.x)*(B.y-A.y); } double Distance(const Point & A,const Point & B) { return sqrt((A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y)); } double GetHeight(const Point & A,const Point & B,const Point & C) { double area=Cross(A,B,C); if(area<0) area=-area; return area/Distance(B,C); }
int main() { Point A; Point B; Point C; double R; while(scanf("%lf%lf%lf%lf%lf%lf",&A.x,&A.y,&B.x,&B.y,&C.x,&C.y)!=EOF) { R=Distance(B,A)*Distance(C,A)/GetHeight(A,B,C); printf("%.2lf\n",R*PI); } return 0; }
|