Rotate Sum 3
Time limit1sMemory limit1024 MB
Given a convex polygon, find the volume swept when it is repeatedly rotated in 3D about its symmetry axes, which move with it.
- Level
Hard9 of 10
- Topics
- Geometry, Math, Implementation
- Solved
- No attempts yet
Problem
Grammy loves geometry. Today, she takes out her precious convex polygon and plays with it.
Grammy thinks that symmetry is a fun characteristic for a convex polygon, so she draws out all the axes of symmetry on the polygon.
NIO is a naughty boy. He repeats the following operation several times. In each operation, he chooses an axis of symmetry as the rotation axis and rotates the polygon in three-dimensional space around that axis by an arbitrary angle. The axes of symmetry rotate together with the polygon.
Grammy wants to know the total volume swept by the convex polygon during NIO's operations. Please help her.
Input
The first line contains an integer (), the number of vertices of the convex polygon.
Each of the next lines contains two integers and (), the coordinates of the -th vertex. The vertices are given in counterclockwise order. No three vertices lie on the same line.
Output
Output a real number, the volume of the swept region. The answer is correct if the absolute or relative error is less than .