How to map cubic pixels to a 2d grid maintaining distance relationships

72 Views Asked by At

I have only basic math understanding, so please excuse any lack of clarity.

I want to crochet an afghan using all the possible 3-color combinations of 6 yarns. Or maybe that's ridiculously too many, I can't tell. The inspiration for this is this blanket: blanket with 2 color combos which has all the 2-color combinations of 10 yarns. Obviously, there will be many more 3-color combinations of 6 yarns.

It may be relevant how this is acheived, which is by holding multiple strands of fine yarn together and using them as one yarn. This allows the possibility of the gradient being more gradual too - for example by using 5 strands instead of 3, but only 3 colors!

Here are my thoughts: Because it's a 3-color combination, one option is to simply represent it as a cube, with each axis representing a color gradient (so x might run from red through gray to green, y from purple through gray to yellow, z from blue through gray to orange). This also prevents "mixing" of the opposite colors, which might be beneficial aesthetically. Assuming I like that, how do I then map each of those cubic coordinates onto a 2d grid? The other inspiration for this is the game I Love Hue Too, specifically this gameboard: gameboard with color gradient on diamond/hex grid and I'm wondering if a simple hex grid would give a more aesthetic gradient, or something like this made of diamonds.

So the simple question is how to map a cube onto a hex (or other simple) grid and roughly preserve the distance relationships from the cube. Other thoughts are welcome!

2

There are 2 best solutions below

5
On

Too long for a comment. Posting as an answer because I think I have guessed what you are trying to say.

In the picture there are $10 \times 10 = 100$ squares. You describe those as the "two color combinations of $10$ yarns" but that's not the right mathematical language. It probably represents all the pairs $(x,y)$ where each of $x$ and $y$ is one of the colors of yarn (they can be the same color). In this count, (red, blue) is not the same as (blue, red).

If that's what you mean then with three combinations of $6$ yarns there will be $6 \times 6 \times 6 = 216$ possibilities. That's only about twice $100$. The nearest you could get to a square pattern would be $12$ by $18$.

I haven't thought about arranging the $216$ combinations as hexagons or parallelograms in a hex grid. You could work on that by experimenting with hex grid graph paper.

Good luck with the aesthetics. I don't think there's mathematics for that.

2
On

Here's a possible arrangement and coloring. Since there are $\binom{6}{3} = 20$ different combinations of three colors selected out of six total, this design is based on a flattening of the $20$-sided regular polyhedron, the icosahedron. The icosahedron usually looks like this (a d$20$, if you've gamed before):

enter image description here

Flattened out, it can be arranged like this:

enter image description here

There are $19$ triangles shown; the $20$th and last side is represented by the entire outside, and is labeled orange/green/purple here. Each of the other regions is labeled with their three colors. This design has the property that any two adjacent sides share two colors, while diametrically opposite sides share no colors. All triangles that share two colors are furthermore either adjacent or both border the same triangle (I believe).

I haven't sat down and figured out how many such arrangements there are. I also don't expect anyone to actually use these colors; the combinations look a little gruesome. But a simple substitution will work. :-)