Is there a function to compute the area of the triangle that include any point in a 2D points set?
2 views (last 30 days)
Show older comments
Hello, everyone.
I am an engineer, and I want to know the way to assess the evenness of the distribution of points in a 2D point set.
And my idea is that:
- For any point P, there must be a triangle that including the point P in it, and the triangle is the particular triangle has the minimum area among the triangles that including point P in it.
- Get all the triangles area and compute the variance of the areas of the triangles.
But, find the triangles with the minimum area including point P and compute the area is an unfamiliar work for me.
So, anyone know is there has a function has this functionality?
If anyone knows, Please tell me!
1 Comment
John D'Errico
on 27 Apr 2016
Huh? Your idea is wildly confusing. No, there is certainly no way to do something that you cannot even explain.
At the same time, there are surely many ways to describe how uniformly scattered a set of points may be in the x-y plane. You might start by looking at the nearest neighbor for any point.
Accepted Answer
Jan
on 27 Apr 2016
Edited: Jan
on 28 Apr 2016
This cannot work. If it works, it would work for a bunch of point placed on a circle. But how do you want to define the triangles in this case?
You can divide the area into polygones, see https://en.wikipedia.org/wiki/Voronoi_diagram. This is related to the Delauny triangulation, because the edges go perpendicular through the midpoints of the triangle sides. But as you see, the Voronoi distribution is not built by triangles in the general case.
Even the Delauny triangularisation is not unique. Imagine 4 points: 3 are on the corners of a square, one has a larger distance to the center. Then you can either create two equal triangles (which would mean an "even" distribution in your idea) or two triangles with different areas. So which one is the right solution?
The points on the border cannot have a surrounding area.
More Answers (1)
Image Analyst
on 27 Apr 2016
Edited: Image Analyst
on 27 Apr 2016
Alex:
What you want is "spatial statistics" and there is a lot of work in that field. The best book I have found is by Adrian Baddeley at CSIRO (Australia) There are lots of methods over 171 pages for characterizing point patterns into degrees of "regular/periodic", "random/Poisson", and "clustered". Check it out. It's a fascinating book.
First go down to section 1.2.2 on page 7 and see the patterns. Then you might go down to page 53 and look at "Tests of Complete Spatial Randomness". Good luck.
By the way, there is a function polyarea() that will get you the area of a triangle or any polygon.
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!