Skip to main content
Tweeted twitter.com/#!/StackMma/status/599475355473285120
edited tags
Link
Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k
added 5 characters in body; edited tags
Source Link

I would like to construct a grid from a matrix. For example, one possible matrix is M1$M1$.

$$M1= \begin{pmatrix} c2 & a1 & a1 & a1 & a1 & a1\\ a2 & b1 & c2 & a1 & a1 & a1\\ a2 & c2 & b2 & a1 & a1 & a1\\ b2 & b2 & c1 & b1 & c2 & a1\\ b2 & c1 & b1 & c2 & b2 & a1\\ a2 & b1 & b1 & a2 & a2 & c2\\ \end{pmatrix} $$

Each element a1, a2, ..., c2$a1, a2, \dots, c2$ is represented graphically as the following.: 6vertex

So I want to represent M1$M1$ as:

enter image description heregrid representation

Here, how an element, c2$c2$ fits in the grid is shown as an example.
Is this possible in MathematicaMathematica? Currently, I have no idea even where to begin. Any help will be appreciated!

I would like to construct a grid from a matrix. For example, one possible matrix is M1.

$$M1= \begin{pmatrix} c2 & a1 & a1 & a1 & a1 & a1\\ a2 & b1 & c2 & a1 & a1 & a1\\ a2 & c2 & b2 & a1 & a1 & a1\\ b2 & b2 & c1 & b1 & c2 & a1\\ b2 & c1 & b1 & c2 & b2 & a1\\ a2 & b1 & b1 & a2 & a2 & c2\\ \end{pmatrix} $$

Each element a1, a2, ..., c2 is represented graphically as following. 6vertex

So I want to represent M1 as:

enter image description here

Here, how an element, c2 fits in the grid is shown as an example.
Is this possible in Mathematica? Currently, I have no idea even where to begin. Any help will be appreciated!

I would like to construct a grid from a matrix. For example, one possible matrix is $M1$.

$$M1= \begin{pmatrix} c2 & a1 & a1 & a1 & a1 & a1\\ a2 & b1 & c2 & a1 & a1 & a1\\ a2 & c2 & b2 & a1 & a1 & a1\\ b2 & b2 & c1 & b1 & c2 & a1\\ b2 & c1 & b1 & c2 & b2 & a1\\ a2 & b1 & b1 & a2 & a2 & c2\\ \end{pmatrix} $$

Each element $a1, a2, \dots, c2$ is represented graphically as the following: 6vertex

So I want to represent $M1$ as:

grid representation

Here, how an element, $c2$ fits in the grid is shown as an example.
Is this possible in Mathematica? Currently, I have no idea even where to begin. Any help will be appreciated!

Source Link

Constructing a grid from a matrix

I would like to construct a grid from a matrix. For example, one possible matrix is M1.

$$M1= \begin{pmatrix} c2 & a1 & a1 & a1 & a1 & a1\\ a2 & b1 & c2 & a1 & a1 & a1\\ a2 & c2 & b2 & a1 & a1 & a1\\ b2 & b2 & c1 & b1 & c2 & a1\\ b2 & c1 & b1 & c2 & b2 & a1\\ a2 & b1 & b1 & a2 & a2 & c2\\ \end{pmatrix} $$

Each element a1, a2, ..., c2 is represented graphically as following. 6vertex

So I want to represent M1 as:

enter image description here

Here, how an element, c2 fits in the grid is shown as an example.
Is this possible in Mathematica? Currently, I have no idea even where to begin. Any help will be appreciated!