Problem J
Triangle To Hexagon
Given a triangle $ABC$ with incenter (center of its inscribed circle) $I$, and circumscribed circle $O$, let $M$, $N$ and $P$ be the second points of intersection of the lines through $A$ and $I$, $B$ and $I$ resp. $C$ and $I$ with the circle $O$.
Let $E$ and $F$ be the intersections of the line $NP$ with $AB$ and $AC$ respectively. Similarly, let $G$ and $H$ be the intersections of the line $MN$ with $AC$ and $BC$ respectively and let $J$ and $K$ be the intersections of the line $MP$ with $BC$ and $AB$ respectively.
Write a program which takes as input the coordinates of the vertices $A$, $B$ and $C$ of the triangle and outputs the lengths of the segments $EF$, $FG$, $GH$, $HJ$, $JK$ and $KE$. Supposedly,
\[ |EF| + |GH| + |JK| \le |KE| + |FG| + |HJ| \]Input
Input consists of a single line containing three real values: the $x$ coordinate of $B$, $B_ x$ ($-20 \le B_ x \le 20$), the $x$ coordinate of $C$, $C_ x$ ($-20 \le C_ x \le 20$) and the $y$ coordinate of $C$, $C_ y$ ($-20 \le C_ y \le 20$). The floating point values are given with up to $4$ digits after the decimal point. $A$ will always be the origin $(0,0)$ and $B$ will always be on the $x$-axis so $B_ y = 0$.
Output
Output $6$ decimal values separated by spaces, which are the lengths of $EF$, $FG$, $GH$, $HJ$, $JK$ and $KE$ in that order.
Your answers will be considered correct if their absolute or relative error does not exceed $10^{-6}$.
Sample Input 1 | Sample Output 1 |
---|---|
3 2.5 3 |
0.999173 1.533202 0.995436 0.929975 1.185867 0.904840 |
Sample Input 2 | Sample Output 2 |
---|---|
3 2 3 |
1.045048 1.330900 1.025689 1.023769 1.135779 0.921392 |
Sample Input 3 | Sample Output 3 |
---|---|
3 4 3 |
0.849901 2.239686 0.844710 0.895875 1.378951 0.806287 |