I am creating triangular arrays similar to Pascal's triangle. In an answer to this post, J.M. gives the following code:
triangularArrayLayout[triArray_List, opts___] := Module[{n = Length[triArray]},
Graphics[MapIndexed[
Text[Style[#1, Large], {Sqrt[3] (n - 1 + #2.{-1, 2}), 3 (n - First[#2] + 1)}/2] &,
triArray, {2}], opts]]
Executing the following code generates the array of values:
triangularArrayLayout[Table[StirlingS2[n, k], {n, 0, 5}, {k, 0, n}]]
I want to do something similar. Currently, this is what I have:
Sorry the code is small. It's essentially the same code as J.M.'s.
My triangle is an array of zeros and ones, generated by the function F[n,k]
which returns $0$ or $1$.
I want to turn it into something like this:
Where each $1$ in my array is surrounded by a black box, and each $0$ is surrounded by white space. How can I do this?
CellularAutomaton
... $\endgroup$