This is the inside of the cuphead. I don’t know how to add it to the other thread in gplus.
Now that you shared the end result, how did you go about mapping them? Are the top most leds the center of a matrix? Cool project!
You can see the mapping code in: https://github.com/zekekoch/CupNoise/blob/master/CupNoise.ino. Sorry that a lot of it is so messy. There’s some weirdness going on that I was trying to track down.
The mapping table looks like this: basically the inspiration was a mercator projection and making the ‘virtual’ array the same width as the ‘equator’. I didn’t think about a mapping table until I saw mark’s post about macetech’s glasses. That inspiration was so much simpler than the graph I was toying with.
const uint16_t mappedTable[kRows * kColumns] =
{
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
/* 0 / 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 23, 23, 23, 23, 23, 23, 23, 25, 25,
/ 1 / 20, 19, 19, 18, 18, 18, 17, 17, 16, 16, 16, 15, 15, 14, 14, 14, 22, 22, 22, 21, 21, 21, 20,
/ 2 / 8, 7, 7, 6, 6, 5, 4, 4, 3, 3, 2, 1, 1, 0, 0, 13, 12, 12, 11, 10, 10, 9, 9,
/ 3 / 57, 56, 55, 54, 54, 53, 52, 52, 51, 50, 49, 48, 48, 47, 64, 63, 62, 62, 61, 60, 59, 59, 58,
/ 4 / 37, 36, 35, 34, 33, 32, 31, 31, 30, 29, 28, 27, 26, 46, 45, 44, 43, 42, 41, 40, 39, 39, 38,
/ 5 / 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77,
/ 6 / 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 126, 125, 124, 123, 122, 121, 121, 120, 119, 118, 117, 116,
/ 7 / 94, 93, 92, 91, 90, 89, 88, 88, 145, 144, 104, 103, 102, 101, 100, 100, 99, 99, 98, 97, 96, 95, 94,
/ 8 */ 135, 134, 133, 132, 131, 130, 130, 130, 129, 143, 142, 141, 141, 140, 139, 139, 138, 138, 137, 137, 136, 135, 134,
};
If it’s not obvious, the top of the ‘globe’ is the top of the array and the center of the array is the equator. Then I stretched (dup’d) the pixels when there were less cups on a row. That’s why greenland is so huge on the map.
Thanks, I understand what you’re saying. I really need to start experimenting with mapping 3d objects like this.
