News for hackers. Stuff that matters.
Re:Line drawing on a grid by amitp on Wednesday December 31, 2014 @01:40PM (#8820489)
One nice thing about linear interpolation is that the same algorithm works for 2D grids, 3D grids, and hex grids. For 3D, the diagonal_distance, point_lerp, and point_round functions can look at at z in addition to x and y. For hex grids, you need hex grid distances and hex grid rounding (http://www.redblobgames.com/grids/hexagons/#line-drawing).

There are no comments on this comment yet.