how to sort Indices of a circle in a 3d plane clockwise?
8 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a sort of dots circle in a 3d plane and I want all the indices of the dots to be arranged clockwise. the indices of the dots are attached. Do you know how to do that?
2 个评论
Roger Stafford
2014-1-28
In three dimensions the notion of clockwise versus counterclockwise loses its meaning. The notion of clockwise rotation is strictly a two-dimensional concept. It has the same indeterminacy as trying to distinguish between the two sides of an arbitrary three-dimensional plane. Which side is the "plus" side and which is the "minus" side?
Mischa Kim
2014-1-28
Good point, Roger. Mathematically absolutely correct. From an engineering perspective I would argue that there is a somewhat "obvious" (and therefore in that same sense mathematically not necessarily definable), acceptable solution to the problem.
采纳的回答
Mischa Kim
2014-1-28
编辑:Mischa Kim
2014-1-28
From the x and y data (from ind.mat) compute the polar angles of the dots using atan2. Add the polar angles as the fourth row to the matrix. Then use the sort command to sort the dots in descending order (in terms of angles).
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!