Skip to content

How to convert between spiral and cube hexagonal coordinate systems

Notifications You must be signed in to change notification settings

cooscoos/spiral_cube

Repository files navigation

Spiral to Cube

Here's some code to convert spiral coordinates for a hexagon grid to cube coordinates (q,r,s) and vice versa.

  • The main code is written in Rust. Use cargo run, or go check out hex-spiral as this crate now has the same functionality built in.
  • spiral_to_cube_demo.ipynb shows some of the maths behind how this is done in a visual way, and how you might go about this in Python.

example

About

How to convert between spiral and cube hexagonal coordinate systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published