A regular triangle is given in the plane by the coordinates of its vertices.
Add to the set of these vertices 6 other points so that there are at least 9 regular triangles
(including the given one) with vertices at these 9 points.
Three of the new points must lie strictly inside the triangle, and the remaining
three must lie strictly outside.
Input
The three input lines contain the coordinates of the vertices of the given
triangle. Their absolute values do not exceed 100. The sides
of the triangle are no shorter than 10.
Output
In the first three lines output the coordinates of the points put inside the
triangle. In the following three lines output the coordinates of the points put
outside the triangle. The distance between any of the 9 points must be at
least 1. The distance between any new point and given triangle sides
must be at least 0.1. Two sides are considered equal if their lengths
differ by at most 10−6.
Sample
input | output |
---|
0 30
-25.9807621135 -15
25.9807621135 -15
| 0.0000000000 20.0000000000
-17.3205080757 -10.0000000000
17.3205080757 -10.0000000000
0.0000000000 40.0000000000
-34.6410161514 -20.0000000000
34.6410161514 -20.0000000000
|
Notes
The answer in the sample is incorrect. One can construct
only 3 triangles using the given 9 points.
Problem Author: Vladimir Yakovlev
Problem Source: NEERC 2008, Eastern subregion quarterfinals