关闭

PKU 1673 EXOCENTER OF A TRIANGLE 三角形的垂心

396人阅读 评论(0) 收藏 举报

 

EXOCENTER OF A TRIANGLE

Description

Given a triangle ABC, the Extriangles of ABC are constructed as follows: 

在平面上给定一个三角形ABCABCExtriangles满足下列要求:


On each side of ABC, construct a square (ABDE, BCHJ and ACFG in the figure below). 

ABC的每边,构建一个正方形(ABDEBCHJACFG);
Connect adjacent square corners to form the three Extriangles (AGD, BEJ and CFH in the figure). 

连接邻近的正方形顶点构成三个三角形(AGDBEJCFH)。
The Exomedians of ABC are the medians of the Extriangles, which pass through vertices of the original triangle,extended into the original triangle (LAO, MBO and NCO in the figure. As the figure indicates, the three Exomedians intersect at a common point called the Exocenter (point O in the figure). 

连接DG的中点LA点;EJ的中点HB点,FH的中点NC点,

三线交易O
This problem is to write a program to compute the Exocenters of triangles. 
要求是计算出O点的坐标。

Input

The first line of the input consists of a positive integer n, which is the number of datasets that follow. Each dataset consists of 3 lines; each line contains two floating point values which represent the (two -dimensional) coordinate of one vertex of a triangle. So, there are total of (n*3) + 1 lines of input. Note: All input triangles wi ll be strongly non-degenerate in that no vertex will be within one unit of the line through the other two vertices.

第一行包含一个整数n,表示有n组测试数据;每组测试数据包含3行,每行两个数,表示一个点的坐标,这三个点一定不共线。

Output

For each dataset you must print out the coordinates of the Exocenter of the input triangle correct to four decimal places.

每组测试数据输出O点的坐标。

Sample Input

2

0.0 0.0

9.0 12.0

14.0 0.0

3.0 4.0

13.0 19.0

2.0 -10.0

Sample Output

9.0000 3.7500

-48.0400 23.3600

 

解题思路:

1、  直接模拟,求LAMB的交点,即为O点。

a、  保证ABC按逆时针方向;

b、  求个边的正方形的顶点。

c、  求交点。

d、  注意:向量ab按不同的方向,可以求出两个满足ab垂直acab=acc点。模拟过程中需要特别注意。

2、  另外有人证明O点是ABC的垂心。 

 关于垂心的证明

                                     By--ysl

 

 

 

 
 
 

 


 

 

 

 

 

 

如图建立坐标系,证明O为垂心,即证NCABLABC,BMAC

以证明NCAB为例,其它两条类似

 

 

 

Aa0),Bb0),C0c),Fx1,y1),Hx2,y2

|BC|=|CH|     b2 +c2=x22+(y2-c)2

BCCH                y2-c=x2*b/c  代入上式

x22=c2   同理x21=c2        

因为x1 x2 异号

所以F H 中点在y轴,即证NCAB

                   (如果有错,请大家指出来)

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:6789次
    • 积分:168
    • 等级:
    • 排名:千里之外
    • 原创:11篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章存档