How to walk a volume?

2 次查看(过去 30 天)
John
John 2016-1-12
A cube, side size N, I want to walk from the center going out, walking on each shell, each step can only add 1 to one direction. How to get the position index?
Example: N=4, first "shell" is the nut of N=2, 8 element; then the outer shell. with N=6 another shell. It's easy to "see" how it walk on continuously.
Is there an algorithm out there to have the walking position vectors generated automatically?
Thanks.
  1 个评论
Walter Roberson
Walter Roberson 2016-1-12
Is it permitted to visit any vertex twice? Is it permitted to visit the start vertex of the layer twice?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by