编程介的小学生 2017-03-05 12:07 采纳率: 20.3%
浏览 828
已采纳

Point of Intersection

Given two circles on the same plane which are centered at (x1,y1) and (x2,y2) ,with radiuses r1 and r2, respectively.We can see that they have two common tangent lines in most of the cases.Now you are asked to write a programme to calculate the point of intersection of the two tangents if there exists one. ( See Figure 1 )

Figure. 1 Point of intersection

Input

The input data consists of the information of several figures.The first line of the input contains the number of figures.
Each figure is described by two lines of data.Each line contains 3 integers constituting the coordinates of the center (x, y) and the radius r (>0) of a circle.

Output

For each figure, you are supposed to output the coordinates (x, y) of the point of intersection if it exists.The x and y must be rounded to two decimal places and be separated by one space.If there is no such point exists simply output "Impossible."

Sample Input
2
0 0 10
0 0 5
0 0 10
10 0 1

Output for the Sample Input
Impossible.
11.11 0.00

  • 写回答

2条回答 默认 最新

  • threenewbee 2017-03-10 23:04
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写
  • ¥20 Qcustomplot缩小曲线形状问题
  • ¥15 企业资源规划ERP沙盘模拟
  • ¥15 树莓派控制机械臂传输命令报错,显示摄像头不存在
  • ¥15 前端echarts坐标轴问题
  • ¥15 ad5933的I2C
  • ¥15 请问RTX4060的笔记本电脑可以训练yolov5模型吗?
  • ¥15 数学建模求思路及代码