Polygon Rotation
시간 제한3초메모리 제한256 MB
원점을 내부에 포함하는 볼록 다각형을 각도 알파만큼 회전시킬 때 지나간 영역의 넓이를 구한다.
문제
You are given a convex polygon which contains the origin strictly inside. The polygon is slowly rotated by angle around the origin in counter-clockwise order. Calculate the swept area, that is, the area of the set of all points which were covered by the polygon at least once during its rotation.
입력
Each test consists of one or more test cases.
The first line contains a positive integer , the number of test cases. Then test cases are given.
The first line of each test case contains an integer , the number of vertices of the polygon (), followed by a real number , the rotation angle in radians, given with exactly six digits after the decimal point (). The following lines contain the description of the vertices in counter-clockwise order. Each vertex is described by two integers and which are its coordinates (). It is guaranteed that the polygon has non-zero area, contains the origin strictly inside, and that no three vertices lie on the same line.
The sum of over all test cases does not exceed .
출력
The output must contain lines, one for each test case.
Each line must contain the answer for the corresponding test case with absolute or relative error no more than .