make polygons from points extracted by concave hull - polygon

I would like to make a file including polygon or lines from boundary points extracted from point cloud by concave hull method as shown in below page.
http://ait-survey.com/wp-content/uploads/2015/08/concave_hull_polygon1.png
Boundary points are 3D coordinates.
Also I would like to make polygon file import in AutoCAD.
Let me know how to make it.

That's a interesting problem. I would start with:
Identify the outer circle around the points, as shown here: http://through-the-interface.typepad.com/through_the_interface/2011/02/creating-the-smallest-possible-circle-around-2d-autocad-geometry-using-net.html
Run through the circle degrees (0 to 2PI), find the closest point. That should give you the order of the points, counter-clockwise.
Draw the polyline
I do not have a code 'ready-to-use'... may have some time late this week. But what do you think about the approach?

Related

Subdividing a polygon around a point in R or ArcPro

I am trying to create a 5ha plot around a point within a permissions layer. The permissions layer doesn't always extend 5ha around the point in a square so I cannot clip it. I would like to automate this process.
My current approach is to clip 5ha around the points and then use those where it creates a full square.
Then Use the subdivide polygon tool in Arcpro and use the polygons where the point is mostly in the centre.
Then draw the 5ha manually for the rest of the polygons.
Is there a way to automate this process in R? I've only found how to subdivide the polygon into equal areas.
Thanks

If i already know the Voronoi vertices points, how can i create a polygon from the list?

I'm trying to create this in Gamemaker. I already know the Voronoi vertices but i'm stuck with how to create polygons for each seed object. I need them to be independent so i can split it up later to apply texture mapping to them.
I've tried delaunay already but it doesn't seem as accurate as my voronoi generation. But being that the cicrumradius is the voronoi vertices anyways i feel like i don't need it. The problem with the Delaunay is that it only returns the points near the center of the diagram and doesn't return any points towards the Borders of the Box. The only good thing is that delaunay did skip an extra step and made it easier to return if the the seeds x and y are within the circumradius then just add them to the list of vertices
Is there any way to make a polygon from a plot of points from a data structure?
Pick the midpoint of each edge and the distance to each site then sort the result and pick the first and second (when they are equal) and save them into polygons. For the borders there is of course only 1 edge.
Duplicate:Getting polygons from voronoi edges

Line(s) Equidistant From Two Convex Polygons In 2D

Given two convex polygons in 2D space, how would you go about constructing the line segment(s ) which, at any point on the lines, is equidistant from the closest point of either convex polygon?
I'm looking towards an implementation of Voronoi diagrams for convex polygons instead of points, but I'm unsure how to even begin calculating the line for just two polygons. So I figured I'd take this one step at a time and start here.
Edit To try to make the question a little clearer, I want to bisect the plane (or a subset thereof).
Suppose we have polygon A on the left and polygon B on the right. There will be some line of bisection that divides the plane into points on the left and points on the right. Every point on the line is equally distance from either polygon. Every point left of the line is closer to polygon A than to polygon B. Every point right of the line is closest to polygon B.
Here's an image generated by a Matlab script I wrote that brute-forces an approximation:
The problem, I believe, is not as simple as examining the space in "between" the two polygons, since the line must extend beyond the area directly between the two shapes. And ideally I'd like to find a solution that generalizes to more than two shapes, which, to me, seems to complicate the problem a great deal more. Here's a (obviously very rough) approximation of how that might look:
Well, proceeding one step at a time I'd look at the closest points in the polygons themselves. Let's say a in A is the closest point to B and b in B is the closest point to A. You know the middle point of AB is in the desired segments.
What are the posibilities for a? It can be a vertex of A or it can be a point in one side. The same applies for b. What happens with the "equidistant-segments"? How to build them in each case?
Since those segments are equidistant to sides of the polygons, they have to be part of the line that bissects the angle of the lines containing the corresponding sides.
Am I understanding you correctly but assuming you're wanting the line that effectively bisects the space between 2 convex polygons? If so, then ...
find the line that joins the 2 polygons (P1 & P2)
find each polygon centre (P1.centre & P2.centre) by calculating the average X and Y coordinate.
find the vertex on each polygon that's closest to the other's centre (P1.vc & P2.vc)
given that P1.vc & P2.vc now define the line joining P1 & P2
find the midpoint (mp) of P1.vc & P2.vc
Bisecting line = perpendicular of the line joining P1.vc & P2.vc that passes through mp

Determining the cut of any given polygon and pyramid

I am trying to implement in C++ a function that determines the cut of any given polygon and pyramid.
This has actually turned out to be far simpler than I had first imagined.
Firstly for each edge of the pyramid, test line-plane intersection (the given polygon is a plane, made up of 3 points). This will result in the new vertices at the cutting plane.
Secondly, since the polygon is not an infinite plane one needs to test for line-line intersection between the polygon edges (three) and each of the edges.
Indeed, this is not a simple problem. For simplicity, let's assume that there are no parallel line segments.
First determine the plane where your convex polygon is in. Then detemerine the intersection of that plane with the pyramid. This results in a second convex polygon.
Now you should find the intersection of the two convex polygons. How this can be done, you can find here.

Arrange points in sequence

I have some points in 3D which are in a single plane. I want to arrange them in clock wise or counter clockwise order.
The points can create a concave or convex polygon in a single plane.
Can any body give any suggestions?
Find the center of all the points, then calculate all the angles from the center to each point. Then sort by angle.
Ok, I nearly solve the problem. I got line segment instead of having points in 3d. So, Now I have to arrange line segment in sequence. Which becomes somehow easier for me. I am now able to arrange them in sequence.

Resources