• Advertisement
Sign in to follow this  

Filling a grid using Hamiltonian paths

This topic is 917 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

recently I was trying to implement a Hamilton path function to generate/fill a grid of points with a snake-like path.
Generally the code I have now miss-performs in the beginning and near the last steps, between those (80% of the generation) everything seems extremely fine. I really cannot find what would be the issue. Seems like my nodes just snap and another, related node gets placed in a completely random spot. Maybe somebody could point out where I did a mistake?
Here is my Pastebin code:
I am using GLM for vec2 class, but a simple struct with int x and y would do. 
Thanks in advance!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement