Skip to main content
added 202 characters in body
Source Link
alephalpha
  • 50k
  • 7
  • 68
  • 182

Mathematica

Non-competing because the builtt-in HilbertCurve was introduced in Mathematica 11.1 in 2017.

Inspired by Joe K's answer. Generates 9 images in one program. Arranges the colors in three different orderings: the lexicographical order, the Z-order curve, the Hilbert curve; then places them in the image in (the 2-dimensional version of) these three orderings.

Table[Image@Partition[a[[Ordering@b]]/2^6f[m_, 2^9],
n_] {a,:= {Tuples[Range[2^6]Tuples[Range[2^m] - 1, 3]n], 
   FromDigits[Partition[#, 3]n], 2] & /@ Tuples[{0, 1}, 3*6]n*m], 
   First@HilbertCurve[6First@HilbertCurve[m, 3]}n]},;
 {b, {Tuples[Range[2^9] - 1, 2], 
   FromDigits[Partition[#Table[Image@Partition[a[[Ordering@b]]/2^6, 2]2^9], 2] & /@ Tuples[{0a, 1}f[6, 2*9]3]}, 
  {b, First@HilbertCurve[9f[9, 2]}}]

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Mathematica

Non-competing because the builtt-in HilbertCurve was introduced in Mathematica 11.1 in 2017.

Inspired by Joe K's answer. Generates 9 images in one program.

Table[Image@Partition[a[[Ordering@b]]/2^6, 2^9],
 {a, {Tuples[Range[2^6] - 1, 3], 
   FromDigits[Partition[#, 3], 2] & /@ Tuples[{0, 1}, 3*6], 
   First@HilbertCurve[6, 3]}},
 {b, {Tuples[Range[2^9] - 1, 2], 
   FromDigits[Partition[#, 2], 2] & /@ Tuples[{0, 1}, 2*9], 
   First@HilbertCurve[9, 2]}}]

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Mathematica

Non-competing because the builtt-in HilbertCurve was introduced in Mathematica 11.1 in 2017.

Inspired by Joe K's answer. Generates 9 images in one program. Arranges the colors in three different orderings: the lexicographical order, the Z-order curve, the Hilbert curve; then places them in the image in (the 2-dimensional version of) these three orderings.

f[m_, n_] := {Tuples[Range[2^m] - 1, n],
   FromDigits[Partition[#, n], 2] & /@ Tuples[{0, 1}, n*m],
   First@HilbertCurve[m, n]};

Table[Image@Partition[a[[Ordering@b]]/2^6, 2^9], {a, f[6, 3]}, {b, f[9, 2]}]

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Source Link
alephalpha
  • 50k
  • 7
  • 68
  • 182

Mathematica

Non-competing because the builtt-in HilbertCurve was introduced in Mathematica 11.1 in 2017.

Inspired by Joe K's answer. Generates 9 images in one program.

Table[Image@Partition[a[[Ordering@b]]/2^6, 2^9],
 {a, {Tuples[Range[2^6] - 1, 3], 
   FromDigits[Partition[#, 3], 2] & /@ Tuples[{0, 1}, 3*6], 
   First@HilbertCurve[6, 3]}},
 {b, {Tuples[Range[2^9] - 1, 2], 
   FromDigits[Partition[#, 2], 2] & /@ Tuples[{0, 1}, 2*9], 
   First@HilbertCurve[9, 2]}}]

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here