News for hackers. Stuff that matters.
Re:Hexagonal Grids by SeanLuke on Friday October 20, 2023 @12:05PM (#37957980)
> The cube coordinates are a reasonable choice for a hex grid coordinate system. The constraint is that q + r + s = 0 so the algorithms must preserve that. The constraint also ensures that there's a canonical coordinate for each hex.

If the dimensions aren't independent and/or orthogonal, can this even be called a coordinate system? For example, you can have (1, 4, -5) but you can't have (1, 4, -4).

Re:Hexagonal Grids by SeanLuke on Friday October 20, 2023 @02:10PM (#37959535)
Actually, I think all the examples you provided were independent dimensions. I'll concede orthogonality.

More specifically: can you think of coordinate systems with explicit binary or ternary constraints on the parameters in the coordinates? I can't immediately think of any.

Holonomic constraints etc. are constraints on the validity of regions of the space, not constraints on the ability of coordinates to exist.

Re:Hexagonal Grids by itishappy on Friday October 20, 2023 @02:31PM (#37959753)
Good point! Hmm...

If I understand correctly, homogeneous coordinates have additional independent dimensions, but are many-to-one instead of constraining their parameters. Maybe normalized homogeneous coordinates? That's not a particularly interesting system.

I'm now second guessing my definition of coordinate system...

Re:Hexagonal Grids by SeanLuke on Friday October 20, 2023 @02:44PM (#37959892)
Would points in a simplex qualify as a coordinate system? Their dimensions would have to sum to 1. That is, so-called "normalized" barycentric coordinates maybe, as opposed to standard barycentric coordinates?

https://en.wikipedia.org/wiki/Simplex

https://en.wikipedia.org/wiki/Barycentric_coordinate_system

Re:Hexagonal Grids by unflxw on Sunday October 22, 2023 @05:21AM (#37973958)
Note that any combination of two of the three "dimensions" does constitute an independent system. That is, given that q + r + s = 0, then q + r = -s, so you could use only (q, r) as your coordinates (and indeed that's likely how you'd canonically refer to them)

The "third coordinate" is only for convenience when working with the three main axes of an hexagonal grid. Without it, the three directions of your grid are {+q, +r, -q-r}, which introduces an ugly asymmetry for one of the three axes.