Just use the colors / materials as a hidden 4th index!
So, given a 'line' of cubes from w = -N to w =+N, you essentially have a bitmap where each active cube along the line counts as 1 and each inactive cube counts as 0. Then just convert it to the hex value and you have a color.
Example:
There are 5 cubes, x = 0, y = 0, z = 0, w = -2 to x = 0, y = 0, z = 0, w = 2. In order they are inactive, active, inactive, inactive, active. This translates to binary 01001. You can convert this to a color any way you like. :)
Then just give the cube at x = 0, y = 0, z = 0 the color / material you want.
In computer graphics space, especially game-dev, it's usually used for depth (given X and Y are used for the two monitor axis in 2D, Z then extends into or out of the monitor).
37
u/Iain_M_Norman Dec 17 '20
Cool. And part 2? *grins*
6
u/Meowth52 Dec 17 '20
Haha, when I read it my first thought was: will someone visualize it in minecraft?
5
u/lukewarm1997 Dec 17 '20
Best visualization yet. I love it!
2
u/zxywx Dec 17 '20
That's pretty awesome!
Your idea of what the Z axis is differs from mine though ;-)
1
u/DFreiberg Dec 17 '20
I'm guessing you used Carpet Mod to load in the aoc_d17 account?
2
u/aardvark1231 Dec 17 '20
Awesome!
1
u/Autom3 Dec 17 '20
Hah, I just did this with WorldEdit and the generate command :P
1
u/moondaddi80 Dec 17 '20
Cool!
0
u/[deleted] Dec 17 '20
[deleted] — view deleted comment