Arrange points in sequence

2019-04-17 07:10发布

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?

标签: math polygon 3d
2条回答
欢心
2楼-- · 2019-04-17 07:28

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.

查看更多
欢心
3楼-- · 2019-04-17 07:32

Find the center of all the points, then calculate all the angles from the center to each point. Then sort by angle.

查看更多
登录 后发表回答