编程介的小学生 2018-12-21 16:00 采纳率: 20.5%
浏览 315
已采纳

如何计算三维空间的顶点,懂算法的高手来看下,是C语言的算法

Problem Description
There are n points in three dimensional space.

Consider the convex hull of n points.

Given a plane, you should work out the area of section of convex hull by the plane.

Input
First line contains T(T <= 10), a number of test cases.

For each test case, there are two integer n and m, number of points and number of queries.

Next n lines contains three integers x, y, z, coordinate of point.

Next m lines contains four integers a, b, c, d, specifying the equation of plane: ax + by + cz + d = 0.

1 <= n <= 1000
1 <= q <= 1000
Absolute values of x, y, z, a, b, c and d are not greater than 2000.

Output
For each test case, first line contains “Case #x:”, x is the number of the case.
For each query, you should print one float number in three decimal places in one line.

Sample Input
1
6 1
0 0 1
1 0 1
0 1 1
0 0 -1
1 0 -1
0 1 -1
0 0 1 0

Sample Output
Case #1:
0.500

  • 写回答

1条回答 默认 最新

  • threenewbee 2019-08-25 00:08
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号