3D Perl 中的凸包
我有一组带有 xyz 坐标的 3D 点。我想计算这些点的凸包。我已经了解了可用的算法,但我无法在 Perl 中做到这一点。 Perl Math:ConvextHull 模块我也检查过,但我不知道如何将这些 3D 点作为输入。请帮我。
X Y Z
POINT 1 -15.037 7.344 14.621
POINT 2 -15.467 6.281 15.522
POINT 3 -15.147 6.738 16.954
POINT 4 -13.998 7.141 17.197
POINT 5 -14.697 4.973 15.165
POINT 6 -15.115 4.480 13.780
POINT 7 -14.965 3.895 16.188
POINT 8 -16.607 4.347 13.471
POINT 9 -16.087 6.731 17.929
POINT 10 -15.826 6.999 19.343
POINT 11 -15.144 5.847 20.038
I have a Set of points in 3D with x y z coordinates. i would lik eto calculate the convex Hull of these points. I haf gone through algorithms available but i couldnt do it in Perl. Perl Math:ConvextHull module also i have checked but i didnt get how to give these 3D points as input. Please help me.
X Y Z
POINT 1 -15.037 7.344 14.621
POINT 2 -15.467 6.281 15.522
POINT 3 -15.147 6.738 16.954
POINT 4 -13.998 7.141 17.197
POINT 5 -14.697 4.973 15.165
POINT 6 -15.115 4.480 13.780
POINT 7 -14.965 3.895 16.188
POINT 8 -16.607 4.347 13.471
POINT 9 -16.087 6.731 17.929
POINT 10 -15.826 6.999 19.343
POINT 11 -15.144 5.847 20.038
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Math::ConvexHull
不会有帮助,因为它只能工作具有 2D 数据(X 和 Y)。不幸的是,它看起来像
Math::Geometry::Planar
< /a> 具有相同的限制。Math::ConvexHull
won't help because it only works with 2D data (X and Y).Unfortunately it looks like
Math::Geometry::Planar
has the same limitation.半个答案:也许您可以通过从 Perl 驱动 Qhull 库/随附的命令行程序来解决您的问题。
我没有测试,因为我不懂数学。
Half an answer: perhaps you can solve your problem by driving the Qhull library/accompanying command-line programs from Perl.
I didn't test because I don't know the math.