void PermutePlane()
 {
     points.CopyTo(planeState, 0);
     for (int i = 0; i < 3; i++)
     {
         for (int j = 0; j < 7; j++)
         {
             planeState[i] = SFPFunctionsHelper.VectorMatrixProduct(planeState[j], firstMatrices[i]);
         }
     }
 }
 void SetUpHelperMatrices()
 {
     for (int i = 0; i < 3; i++)
     {
         productMatrices[i] = SFPFunctionsHelper.MatrixProduct(firstMatrices[i], secondMatrices[i]);
         for (int j = 0; j < 3; j++)
         {
             for (int k = 0; k < 3; k++)
             {
                 andMatrices[i][j, k]     = firstMatrices[i][j, k] * secondMatrices[i][j, k];
                 impliesMatrices[i][j, k] = SFPFunctionsHelper.Implies(firstMatrices[i][j, k], secondMatrices[i][j, k]);
             }
         }
     }
 }
    IEnumerator ShuffleCube(int index)
    {
        Vector3[] newVertices = new Vector3[24];
        cube.mesh.vertices.CopyTo(newVertices, 0);
        int count = 0;

        while (count < 10)
        {
            for (int i = 0; i < 24; i++)
            {
                newVertices[i] = Vector3.Lerp(newVertices[i], SFPFunctionsHelper.VectorMatrixProduct(newVertices[i], sfp.productMatrices[index]), 0.1f);
            }
            cube.mesh.vertices = newVertices;
            yield return(new WaitForSeconds(0.1f));
        }
    }
 // Update is called once per frame
 void SeedMatrices(int[][,] array)
 {
     foreach (int[,] matrix in array)
     {
         do
         {
             for (int i = 0; i < 3; i++)
             {
                 for (int j = 0; j < 3; j++)
                 {
                     matrix[i, j] = rnd.Range(0, 2);
                 }
             }
         } while (SFPFunctionsHelper.Determinant(matrix) == 0);
     }
 }