编程介的小学生 2019-06-27 21:39 采纳率: 20.5%
浏览 172

天体的碰撞的控制计算,怎么使用C语言的程序的设计的技术有效地去实现这个计算

Problem Description
Association of Collision Management (ACM) is planning to perform the controlled collision of two as-teroids. The asteroids will be slowly brought together and collided at negligible speed. ACM expects asteroids to get attached to each other and form a stable object. Each asteroid has the form of a convex polyhedron. To increase the chances of success of the experiment ACM wants to bring asteroids together in such manner that their centers of mass are as close as possible.
To achieve this, ACM operators can rotate the asteroids and move them independently before bringing them together. Help ACM to find out what minimal distance between centers of mass can be achieved. For the purpose of calculating center of mass both asteroids are considered to have constant density.

Input
Input file contains two descriptions of convex polyhedra.
The first line of each description contains integer number n indicate the number of vertices of the polyhedron (4 <= n <= 60). The following n lines contain three integer numbers xi; yi; zi each --- the coordinates of the polyhedron vertices (-10000 <= xi, yi, zi <= 10000). It is guaranteed that the given points are vertices of a convex polyhedron, in particular no point belongs to the convex hull of other points. Each polyhedron is non-degenerate. The two given polyhedra have no common points.

Output
Output one floating point number --- the minimal distance between centers of mass of the asteroids that can be achieved. Your answer must be round up to 0.01.

Sample Input
8
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
5
0 0 5
1 0 6
-1 0 6
0 1 6
0 -1 6

Sample Output
0.75

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥30 求解达问题(有红包)
    • ¥15 请解包一个pak文件
    • ¥15 不同系统编译兼容问题
    • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
    • ¥30 数字电源对DSP芯片的具体要求
    • ¥20 antv g6 折线边如何变为钝角
    • ¥30 如何在Matlab或Python中 设置饼图的高度
    • ¥15 nginx中的CORS策略应该如何配置
    • ¥30 信号与系统实验:采样定理分析
    • ¥100 我想找人帮我写Python 的股票分析代码,有意请加mathtao