Comments (8)
Hey, thanks for the issue, it looks very interesting managing the coordinate conversion and neighbour hex discovery. I'll dig into it over the weekend and think about what can be done
from hexagonal_pathfinding_astar.
Awesome.
I think the original idea is from Paul Bourke. He calls it a Spiral Honeycomb Mosaic (SHM).
See his Tiling on The Plane page. Scroll down to the section titled Hexagonal Lattice (contains links to source code with coordinate conversions).
from hexagonal_pathfinding_astar.
Just to let you know the next feature version will have a form of SHM, I don't think it's feasible to have "spikey" spirals so there must be a set number of rings around the origin. Something like if a giant letter P
was made of hexagons I can't think of way to safe guard the bottom sticking out in neighbour discovery, so the implementation will be very similar to axial/cubic geometry where it's a circular grid. Once I push it up I'll tag you on the PR to see if it's what you expect if that's ok?
Once that makes 1.1.0 I'll very shortly after be releasing 2.0.0 to handle an edge case across all the coordinate systems which does mean the overall return type will become an Option<Vec<(i32, i32)>>
rather than the current Vec<(i32, i32)>
where None
means there's no path based on #12. Just as an FYI in case you're wanting to use this for something
from hexagonal_pathfinding_astar.
Very cool! Let me know when there is something in the repo to test. :)
from hexagonal_pathfinding_astar.
I think the original idea is from Paul Bourke. He calls it a Spiral Honeycomb Mosaic (SHM).
For the record, I came up with the spiral coordinates in hex-spiral
without any existing influences (though it's quite simple, so it's likely to have existed as a concept already), and the coordinates in Spiral Honeycomb Mosaic seem to work differently at first glance.
from hexagonal_pathfinding_astar.
I think the original idea is from Paul Bourke. He calls it a Spiral Honeycomb Mosaic (SHM).
For the record, I came up with the spiral coordinates in
hex-spiral
without any existing influences (though it's quite simple, so it's likely to have existed as a concept already), and the coordinates in Spiral Honeycomb Mosaic seem to work differently at first glance.
They do indeed. My bad.
And since there is no Rust crate that supports SHM at all I would ask @BlondeBurrito to use hex-spiral
as a testbed for the spiral a-star pathfinding being added to this crate.
from hexagonal_pathfinding_astar.
Just to let you know the next feature version will have a form of SHM, [...]
Is there any update on this or code that can be tested?
from hexagonal_pathfinding_astar.
Hey, please accept my apologies, in truth I forgot about this - I reached a point of burnout with work and haven't had the energy to hobby code very much.
I've tidied up what I did and raised PR #15 which introduces Spiral Hex based coordinates in the style of @ljedrz. Tests are passing. The coordinate style in the works of Paul Bourke making use of clusters of hexagons with a base7 numbering system proved too hard really but hopefully this is still useful. Most of it boils down to converting Spiral Hex coords into Cubic coords as they're a bit easier to work with.
Let me know what you think and once merged I'll tag it and publish a new crate version
from hexagonal_pathfinding_astar.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexagonal_pathfinding_astar.