Solve 3D Visit-Once Tree Puzzle with 16x16x16 Grid

  • Thread starter Thread starter intervoxel
  • Start date Start date
  • Tags Tags
    3d Tree
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
6 replies · 2K views
intervoxel
Messages
192
Reaction score
1
I'm trying to build a software function that explores a 3d grid visiting the cells just once. The file below is my last attempt, which misses some cells (for 16x16x16 it visits 3436 cells instead of 4095). Can anyone give me a reference to a solution, please.
 

Attachments

Physics news on Phys.org
I don't want to spend a whole lot of time on this, so you have to make things easy for me.
So how is boolean function isAllowed() used?
What is object principal?
Could you put your listing in single space so I can see more of it at a time?
Could you add some comments so that I don't have to figure it out from scratch?
 
I appreciate your interest in my problem, Scott. I prepared a simplified running demo, avoiding my program notation. The main goal is to generate a always expanding tree, filling completelly the space, as shown schematically in the figure. The present solution leaves gaps, which I could not solve. Thank you for any help.
 

Attachments

  • tree.png
    tree.png
    64.5 KB · Views: 476
  • tree.pdf
    tree.pdf
    176.8 KB · Views: 278
Does anyone know a reference to this subject? This seems like a problem solved a long time ago. Thanks for any help.
 
Hi, Scott. Have you seen the code I posted? Any insights?
 
Hi, DrGeg, I need an always expanding tree (no returns allowed).