Skip to content

Linear interpolation with hexagonal coordinates on x+y+z=0. Implemented in Pygame.

Notifications You must be signed in to change notification settings

leifekstromclark/hexagonal-coordinates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

hexagonal-coordinates

Hexagonal coordinates can be conveniently modeled as points on the plane x + y + z = 0

Visual Representation

Blender.2022-07-28.11-02-38.mp4

These coordinates allow ease of operations such as linear interpolation. They can conveniently be converted back to axial coordinates as necessary. This is an example of linear interpolation on a hexagonal grid using cubic coordinates. The program uses linear interpolation to highlight a line of hexagons between two points. Such a path could be useful for line of sight and movement in a strategy game. It is written in Python and displays results using Pygame.

Example result

image

About

Linear interpolation with hexagonal coordinates on x+y+z=0. Implemented in Pygame.

Topics

Resources

Stars

Watchers

Forks

Languages