UVA 11178 Morley's Theorem 计算几何

2015-01-27 22:36:08 ? 作者: ? 浏览: 87


计算几何: 最基本的计算几何,差积 旋转


Morley's Theorem

Time Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu

Submit Status

Description

Download as PDF

Problem D
Morley’s Theorem
Input:
Standard Input

Output: Standard Output

Morley’s theorem states that that the lines trisecting the angles of an arbitrary plane triangle meet at the vertices of an equilateral triangle. For example in the figure below the tri-sectors of angles A, B and C has intersected and created an equilateral triangle DEF.

\

Of course the theorem has various generalizations, in particular if all of the tri-sectZ??http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcnMgYXJlIGludGVyc2VjdGVkIG9uZSBvYnRhaW5zIGZvdXIgb3RoZXIgZXF1aWxhdGVyYWwgdHJpYW5nbGVzLiBCdXQgaW4gdGhlIG9yaWdpbmFsIHRoZW9yZW0gb25seSB0cmktc2VjdG9ycyBuZWFyZXN0IHRvIEJDIGFyZSBhbGxvd2VkIHRvIGludGVyc2VjdCB0byBnZXQgcG9pbnQgRCwgdHJpLXNlY3RvcnMKIG5lYXJlc3QgdG8gQ0EgYXJlIGFsbG93ZWQgdG8gaW50ZXJzZWN0IHBvaW50IEUgYW5kIHRyaS1zZWN0b3JzIG5lYXJlc3QgdG8gQUIgYXJlIGludGVyc2VjdGVkIHRvIGdldCBwb2ludCBGLiBUcmlzZWN0b3JsaWtlIEJEIGFuZCBDRSBhcmUgbm90IGFsbG93ZWQgdG8gaW50ZXJzZWN0LiBTbyB1bHRpbWF0ZWx5IHdlIGdldCBvbmx5IG9uZSBlcXVpbGF0ZXJhbCB0cmlhbmdsZSBERUYuIE5vdyB5b3VyIHRhc2sgaXMgdG8gZmluZCB0aGUgQ2FydGVzaWFuCiBjb29yZGluYXRlcyBvZiBELCBFIGFuZCBGIGdpdmVuIHRoZSBjb29yZGluYXRlcyBvZiBBLCBCLCBhbmQgQy48L3A+CjxwPiA8L3A+CjxoNT5JbnB1dDwvaDU+CjxwPkZpcnN0IGxpbmUgb2YgdGhlIGlucHV0IGZpbGUgY29udGFpbnMgYW4gaW50ZWdlciBOICgwPE48NTAwMSkgd2hpY2ggZGVub3RlcyB0aGUgbnVtYmVyIG9mIHRlc3QgY2FzZXMgdG8gZm9sbG93LiBFYWNoIG9mIHRoZSBuZXh0IGxpbmVzIGNvbnRhaW4gc2l4IGludGVnZXJzIDxpbWcgd2lkdGg9"131" height="24" src="https://www.cppentry.com/upload_files/article/49/1_jpwbg__.gif" alt="\">. This six integers actually indicates that the Cartesian coordinates of point A, B and C are \ respectively. You can assume that the area of triangle ABC is not equal to zero, \ and the points A, B and C are in counter clockwise order.

Output

For each line of input you should produce one line of output. This line contains six floating point numbers \ separated by a single space. These six floating-point actually means that the Cartesian coordinates of D, E and F are \ respectively. Errors less than \ will be accepted.

Sample Input Output for Sample Input

2 
1 1 2 2 1 2 
0 0 100 0 50 50

1.316987 1.816987 1.183013 1.683013 1.366025 1.633975

56.698730 25.000000 43.301270 25.000000 50.000000 13.397460

                  

Problemsetters: Shahriar Manzoor

Special Thanks: Joachim Wulff

Source

Root :: Prominent Problemsetters :: Shahriar Manzoor

Root :: AOAPC I: Beginning Algorithm Contests -- Training Guide (Rujia Liu) :: Chapter 4. Geometry :: Geometric Computations in 2D :: Examples



#include 
  
   
#include 
   
     #include 
    
      #include 
     
       #include 
      
        using namespace std; const double eps=1e-8; int dcmp(double x) { if(fabs(x)