简体   繁体   English

如何从一堆点中找到包含三角形的最小点P(x,y)?

[英]How do i find the smallest point P(x,y) containing triangle from a bunch of points?

This is something a human child can do, but I need a computer to do it :D 这是人类孩子可以做的事情,但是我需要一台电脑来完成它:D

Guess you have a point P(x,y) and you have an array of points A = [P1, P2, P3, …] 假设您有一个点P(x,y),并且有一个点数组A = [P1, P2, P3, …]

What i basically need to get is the 3 points that 我基本上需要得到的是3点

  • form a triangle that surrounds P 形成一个包围P的三角形
  • form from those that surround P the smallest triangle possible 由包围P的那些形成的可能的最小三角形

Well, of course I could just bruteforce it by calculating all possible triangles, barycentric interpolate if they're containing the point and compare the areas size of the resulting triangles, but this soon gets very time consuming. 好吧,当然,我可以通过计算所有可能的三角形,如果它们包含点的重心插值并比较所得三角形的面积大小来对其进行蛮力分析,但这很快就非常耗时。

I think this has been done before and is one of those ›if-you-know-the-name-of-the-algorythm-you-know-what-to-implement‹-problems. 我认为这是以前做过的,如果您知道算法的名称,您知道该如何实施‹问题之一。

I should add that if two triangles are reasonably close in size, than any of them would be a good solution, so in that case, the faster solution would be the better one. 我应该补充一点,如果两个三角形的大小相当接近,那么比任何一个三角形都将是一个很好的解决方案,因此在这种情况下,越快的解决方案越好。

Build Delaunay triangulation for given set of points and find triangle containing the point. 为给定的点集构建Delaunay三角剖分 ,并找到包含该点的三角形。

Perhaps it will not the most optimal triangle, but algorithm is well-known and fast. 也许它不是最佳的三角形,但是算法是众所周知的且速度很快。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 给定顶点,基本中点和基本宽度,如何找到等腰三角形的所有点? - How do I find all points of an isosceles triangle given the vertex point, base midpoint, and base width? 如何找到包含所有点或与y = x轴对称的点的最小矩形? - How can I find the least rect, which contains all points or the point symmetrical to the y=x axis? 如何从包含给定点的一组点中找到最小的N维单形? - How to find the smallest N dimensional simplex from a set of points that contains a given point? 如何从多个点找到最远的 x, y 坐标? - How to find the farthest x, y coordinates from many points? 包含x%点的最小边界球体 - Smallest Bounding Sphere containing x% of points 如何找到小于或等于X的最大值和大于或等于X的最小值? - How do I find the largest value smaller than or equal to X and the smallest value greater than or equal to X? 如何在二进制图像中找到线段的x,y的中间点? - How can I find the middle points of x, y of a line segment in a binary image? 找到包含给定点数的最小包含凸多边形 - find the smallest containing convex polygon with a given number of points 如何确定点在3D中是否在三角形内? - How can I find out if point is within a triangle in 3D? 我无法理解方程式的解,该解说找到最小的数,使得x加y等于x按位或y - I fail to understand the solution of a equation which says that find smallest number such that x plus y is equals x bitwise OR y
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM