Advertisement
Schoggi

Code

Feb 18th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 21.90 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using UnityEngine;
  5.  
  6. public class MarchinCubes : MonoBehaviour
  7. {
  8.     public int size = 1;
  9.     public float surfaceValue = .5f;
  10.  
  11.     public int xOffset = 0;
  12.     public int yOffset = 0;
  13.     public int zOffset = 0;
  14.  
  15.     public float zoom = 1;
  16.     public bool interpolation;
  17.     public bool shading;
  18.     public bool autoUpdate;
  19.  
  20.     public bool sphereValues;
  21.  
  22.     void Start()
  23.     {
  24.         xOffset = (int)transform.position.x;
  25.         yOffset = (int)transform.position.y;
  26.         zOffset = (int)transform.position.z;
  27.  
  28.         Starter();
  29.     }
  30.  
  31.     void Update()
  32.     {
  33.         if (Input.GetKeyDown(KeyCode.U) || autoUpdate)
  34.         {
  35.             xOffset = (int)transform.position.x;
  36.             yOffset = (int)transform.position.y;
  37.             zOffset = (int)transform.position.z;
  38.  
  39.             Starter();
  40.  
  41.             Vector3 position = transform.position;
  42.  
  43.             Vector3 newPosition = new Vector3(Mathf.Floor(position.x), Mathf.Floor(position.y), Mathf.Floor(position.z));
  44.  
  45.             transform.position = newPosition;
  46.         }
  47.     }
  48.  
  49.     void Starter()
  50.     {
  51.         int pointSize = size + 1;
  52.         float[][][] values = sphereValues ? sphere(pointSize) : Perlin(pointSize);
  53.  
  54.         Mesh mesh = CreateMesh(values, pointSize - 1);
  55.  
  56.         mesh.RecalculateNormals();
  57.         GetComponent<MeshFilter>().mesh = mesh;
  58.     }
  59.  
  60.     float[][][] sphere(int size)
  61.     {
  62.         float[][][] values = initializeFloatArray(size);
  63.  
  64.         for (int x = 0; x < size; x++)
  65.         {
  66.             for (int y = 0; y < size; y++)
  67.             {
  68.                 for (int z = 0; z < size; z++)
  69.                 {
  70.                     values[x][y][z] = 10 - distance(x, y, z, size / 2, size / 2, size / 2);
  71.                 }
  72.             }
  73.         }
  74.  
  75.         return values;
  76.     }
  77.  
  78.     float distance(float x, float y, float z, float xCenter, float yCenter, float zCenter)
  79.     {
  80.         return Mathf.Sqrt(Mathf.Pow(x - xCenter, 2) + Mathf.Pow(y - yCenter, 2) + Mathf.Pow(z - zCenter, 2));
  81.     }
  82.  
  83.     float[][][] Perlin(int size)
  84.     {
  85.         float[][][] values = initializeFloatArray(size);
  86.  
  87.         for (int x = 0; x < size; x++)
  88.         {
  89.             for (int y = 0; y < size; y++)
  90.             {
  91.                 for (int z = 0; z < size; z++)
  92.                 {
  93.                     if (x == 0 || x == size - 1 || y == 0 || y == size - 1 ||z == 0 || z == size - 1)
  94.                     {
  95.                         values[x][y][z] = 0;
  96.                     }
  97.                     else
  98.                     {
  99.                         values[x][y][z] = (GetPerlin(x, y, z, 40f) + GetPerlin(x, y, z, 20f)) / 2;
  100.                     }
  101.                 }
  102.             }
  103.         }
  104.  
  105.         return values;
  106.     }
  107.  
  108.     float GetPerlin(int xInt, int yInt, int zInt, float divider)
  109.     {
  110.         float z = (zInt + zOffset) / divider;
  111.         float y = (yInt + yOffset) / divider;
  112.         float x = (xInt + xOffset) / divider;
  113.  
  114.         float zy = Mathf.PerlinNoise(x, y);
  115.         float zx = Mathf.PerlinNoise(x, z);
  116.         float yx = Mathf.PerlinNoise(y, z);
  117.         float yz = Mathf.PerlinNoise(y, x);
  118.         float xz = Mathf.PerlinNoise(z, x);
  119.         float xy = Mathf.PerlinNoise(z, y);
  120.  
  121.         return (xy + xz + yz + yx + zx + zy) / 6;
  122.     }
  123.  
  124.     float[][][] initializeFloatArray(int size)
  125.     {
  126.         float[][][] values = new float[size][][];
  127.  
  128.         for (int x = 0; x < size; x++)
  129.         {
  130.             values[x] = new float[size][];
  131.  
  132.             for (int i = 0; i < size; i++)
  133.             {
  134.                 values[x][i] = new float[size];
  135.             }
  136.         }
  137.  
  138.         return values;
  139.     }
  140.  
  141.     Mesh CreateMesh(float[][][] values, int size)
  142.     {
  143.         Vector3[] vertices = initializeVector3Array(size * 2 + 1, size * 2 + 1, size * 2 + 1);
  144.         int[] triangles = new int[size * size * size * 3 * 2];
  145.         Mesh mesh = new Mesh();
  146.  
  147.         int triangleCount = 0;
  148.  
  149.         for (int x = 0; x < size; x++)
  150.         {
  151.             for (int y = 0; y < size; y++)
  152.             {
  153.                 for (int z = 0; z < size; z++)
  154.                 {
  155.                     int[] triangleTable = table[getTriangleIndex(
  156.                         new[] {
  157.                             values[x][y][z],
  158.                             values[x + 1][y][z],
  159.                             values[x + 1][y][z + 1],
  160.                             values[x][y][z + 1],
  161.                             values[x][y + 1][z],
  162.                             values[x + 1][y + 1][z],
  163.                             values[x + 1][y + 1][z + 1],
  164.                             values[x][y + 1][z + 1]
  165.                         },
  166.                         surfaceValue)];
  167.  
  168.                     int[] trianglesToAdd = new int[triangleTable.Length];
  169.  
  170.                     for (int i = 0; i < triangleTable.Length; i += 3)
  171.                     {
  172.                         trianglesToAdd[i] = getVertexIndex(x, y, z, triangleTable[i], size * 2 + 2);
  173.                         trianglesToAdd[i + 1] = getVertexIndex(x, y, z, triangleTable[i + 1], size * 2 + 2);
  174.                         trianglesToAdd[i + 2] = getVertexIndex(x, y, z, triangleTable[i + 2], size * 2 + 2);
  175.                     }
  176.  
  177.                     for (int i = 0; i < trianglesToAdd.Length; i++)
  178.                     {
  179.                         triangles[triangleCount] = trianglesToAdd[i];
  180.                         triangleCount++;
  181.                     }
  182.                 }
  183.             }
  184.         }
  185.  
  186.         if (interpolation)
  187.         {
  188.             vertices = addIndterpolation(vertices, size * 2 + 2, values, surfaceValue);
  189.         }
  190.  
  191.         vertices = ScaleVertices(vertices);
  192.  
  193.         if (shading == false)
  194.         {
  195.             RemakeMeshToDiscrete(vertices, triangles, out vertices, out triangles);
  196.         }
  197.  
  198.         mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32;
  199.  
  200.         mesh.vertices = vertices;
  201.         mesh.triangles = triangles;
  202.  
  203.         return mesh;
  204.     }
  205.  
  206.     Vector3[] ScaleVertices(Vector3[] vertices)
  207.     {
  208.         for (int i = 0; i < vertices.Length; i++)
  209.         {
  210.             vertices[i].x = vertices[i].x / transform.localScale.x;
  211.             vertices[i].y = vertices[i].y / transform.localScale.y;
  212.             vertices[i].z = vertices[i].z / transform.localScale.z;
  213.         }
  214.         return vertices;
  215.     }
  216.  
  217.     void RemakeMeshToDiscrete(Vector3[] vert, int[] trig, out Vector3[] outVertices, out int[] outTriangles)
  218.     {
  219.         Vector3[] vertDiscrete = new Vector3[trig.Length];
  220.         int[] trigDiscrete = new int[trig.Length];
  221.         for (int i = 0; i < trig.Length; i++)
  222.         {
  223.             vertDiscrete[i] = vert[trig[i]];
  224.             trigDiscrete[i] = i;
  225.         }
  226.         outVertices = vertDiscrete;
  227.         outTriangles = trigDiscrete;
  228.     }
  229.  
  230.     Vector3[] addIndterpolation(Vector3[] array, int sizeVertices, float[][][] values, float surfaceValue)
  231.     {
  232.         int sizeValues = values.Length;
  233.         for (int x = 0; x < sizeValues - 1; x++)
  234.         {
  235.             for (int y = 0; y < sizeValues - 1; y++)
  236.             {
  237.                 for (int z = 0; z < sizeValues - 1; z++)
  238.                 {
  239.                     int arrayCords = z * 2 + y * sizeVertices * 2 + x * sizeVertices * sizeVertices * 2;
  240.  
  241.                     float value = values[x][y][z];
  242.                     float valueZ = values[x + 1][y][z];
  243.                     float valueY = values[x][y + 1][z];
  244.                     float valueX = values[x][y][z + 1];
  245.  
  246.                     float interpolationValueX = Mathf.Abs(surfaceValue - value) / (Mathf.Abs(surfaceValue - value) + Mathf.Abs(surfaceValue - valueX));
  247.                     float interpolationValueY = Mathf.Abs(surfaceValue - value) / (Mathf.Abs(surfaceValue - value) + Mathf.Abs(surfaceValue - valueY));
  248.                     float interpolationValueZ = Mathf.Abs(surfaceValue - value) / (Mathf.Abs(surfaceValue - value) + Mathf.Abs(surfaceValue - valueZ));
  249.  
  250.                     array[arrayCords + 1] += new Vector3(0, 0, interpolationValueX - .5f);
  251.  
  252.                     array[arrayCords + sizeVertices] += new Vector3(0, interpolationValueY - .5f, 0);
  253.  
  254.                     array[arrayCords + sizeVertices * sizeVertices] += new Vector3(interpolationValueZ - .5f, 0, 0);
  255.                 }
  256.             }
  257.         }
  258.  
  259.         return array;
  260.     }
  261.  
  262.     int getVertexIndex(int z, int y, int x, int cubeValue, int size)
  263.     {
  264.         int[][] vertecieValues = new[] {
  265.             new []{1, 0, 0 },
  266.             new []{2, 0, 1 },
  267.             new []{1, 0, 2 },
  268.             new []{0, 0, 1 },
  269.             new []{1, 2, 0 },
  270.             new []{2, 2, 1 },
  271.             new []{1, 2, 2 },
  272.             new []{0, 2, 1 },
  273.             new []{0, 1, 0 },
  274.             new []{2, 1, 0 },
  275.             new []{2, 1, 2 },
  276.             new []{0, 1, 2 }
  277.         };
  278.  
  279.         int xReturn = z * 2 * size * size;
  280.         int yReturn = y * 2 * size;
  281.         int zReturn = x * 2;
  282.         return xReturn + vertecieValues[cubeValue][0] * size * size + yReturn + vertecieValues[cubeValue][1] * size + zReturn + vertecieValues[cubeValue][2];
  283.     }
  284.  
  285.     int getTriangleIndex(float[] values, float surfaceValue)
  286.     {
  287.         int index = 0;
  288.  
  289.         for (int i = 0; i < 8; i++)
  290.         {
  291.             if (values[i] > surfaceValue)
  292.             {
  293.                 index |= 1 << i;
  294.             }
  295.         }
  296.         return index;
  297.     }
  298.  
  299.     Vector3[] initializeVector3Array(int Xsize, int Ysize, int Zsize)
  300.     {
  301.         Vector3[] array = new Vector3[(Xsize + 1) * (Ysize + 1) * (Zsize + 1)];
  302.         int count = 0;
  303.         for (int x = 0; x < Xsize + 1; x++)
  304.         {
  305.             for (int y = 0; y < Ysize + 1; y++)
  306.             {
  307.                 for (int z = 0; z < Zsize + 1; z++)
  308.                 {
  309.                     array[count] = new Vector3(x / 2f, y / 2f, z / 2f);
  310.                     count++;
  311.                 }
  312.             }
  313.         }
  314.  
  315.         return array;
  316.     }
  317.  
  318.     int[][] table = new int[][] {
  319.         new int[] { },
  320.         new int[] { 8, 3, 0},
  321.         new int[] { 9, 0, 1},
  322.         new int[] { 8, 3, 1, 8, 1, 9},
  323.         new int[] {10, 1, 2},
  324.         new int[] { 8, 3, 0, 1, 2,10},
  325.         new int[] { 9, 0, 2, 9, 2,10},
  326.         new int[] { 3, 2, 8, 2,10, 8, 8,10, 9},
  327.         new int[] {11, 2, 3},
  328.         new int[] {11, 2, 0,11, 0, 8},
  329.         new int[] {11, 2, 3, 0, 1, 9},
  330.         new int[] { 2, 1,11, 1, 9,11,11, 9, 8},
  331.         new int[] {10, 1, 3,10, 3,11},
  332.         new int[] { 1, 0,10, 0, 8,10,10, 8,11},
  333.         new int[] { 0, 3, 9, 3,11, 9, 9,11,10},
  334.         new int[] { 8,10, 9, 8,11,10},
  335.         new int[] { 8, 4, 7},
  336.         new int[] { 3, 0, 4, 3, 4, 7},
  337.         new int[] { 1, 9, 0, 8, 4, 7},
  338.         new int[] { 9, 4, 1, 4, 7, 1, 1, 7, 3},
  339.         new int[] {10, 1, 2, 8, 4, 7},
  340.         new int[] { 2,10, 1, 0, 4, 7, 0, 7, 3},
  341.         new int[] { 4, 7, 8, 0, 2,10, 0,10, 9},
  342.         new int[] { 2, 7, 3, 2, 9, 7, 7, 9, 4, 2,10, 9},
  343.         new int[] { 2, 3,11, 7, 8, 4},
  344.         new int[] { 7,11, 4,11, 2, 4, 4, 2, 0},
  345.         new int[] { 3,11, 2, 4, 7, 8, 9, 0, 1},
  346.         new int[] { 2, 7,11, 2, 1, 7, 1, 4, 7, 1, 9, 4},
  347.         new int[] { 8, 4, 7,11,10, 1,11, 1, 3},
  348.         new int[] {11, 4, 7, 1, 4,11, 1,11,10, 1, 0, 4},
  349.         new int[] { 3, 8, 0, 7,11, 4,11, 9, 4,11,10, 9},
  350.         new int[] { 7,11, 4, 4,11, 9,11,10, 9},
  351.         new int[] { 9, 5, 4},
  352.         new int[] { 3, 0, 8, 4, 9, 5},
  353.         new int[] { 5, 4, 0, 5, 0, 1},
  354.         new int[] { 4, 8, 5, 8, 3, 5, 5, 3, 1},
  355.         new int[] { 2,10, 1, 9, 5, 4},
  356.         new int[] { 0, 8, 3, 5, 4, 9,10, 1, 2},
  357.         new int[] {10, 5, 2, 5, 4, 2, 2, 4, 0},
  358.         new int[] { 3, 4, 8, 3, 2, 4, 2, 5, 4, 2,10, 5},
  359.         new int[] {11, 2, 3, 9, 5, 4},
  360.         new int[] { 9, 5, 4, 8,11, 2, 8, 2, 0},
  361.         new int[] { 3,11, 2, 1, 5, 4, 1, 4, 0},
  362.         new int[] { 8, 5, 4, 2, 5, 8, 2, 8,11, 2, 1, 5},
  363.         new int[] { 5, 4, 9, 1, 3,11, 1,11,10},
  364.         new int[] { 0, 9, 1, 4, 8, 5, 8,10, 5, 8,11,10},
  365.         new int[] { 3, 4, 0, 3,10, 4, 4,10, 5, 3,11,10},
  366.         new int[] { 4, 8, 5, 5, 8,10, 8,11,10},
  367.         new int[] { 9, 5, 7, 9, 7, 8},
  368.         new int[] { 0, 9, 3, 9, 5, 3, 3, 5, 7},
  369.         new int[] { 8, 0, 7, 0, 1, 7, 7, 1, 5},
  370.         new int[] { 1, 7, 3, 1, 5, 7},
  371.         new int[] { 1, 2,10, 5, 7, 8, 5, 8, 9},
  372.         new int[] { 9, 1, 0,10, 5, 2, 5, 3, 2, 5, 7, 3},
  373.         new int[] { 5, 2,10, 8, 2, 5, 8, 5, 7, 8, 0, 2},
  374.         new int[] {10, 5, 2, 2, 5, 3, 5, 7, 3},
  375.         new int[] {11, 2, 3, 8, 9, 5, 8, 5, 7},
  376.         new int[] { 9, 2, 0, 9, 7, 2, 2, 7,11, 9, 5, 7},
  377.         new int[] { 0, 3, 8, 2, 1,11, 1, 7,11, 1, 5, 7},
  378.         new int[] { 2, 1,11,11, 1, 7, 1, 5, 7},
  379.         new int[] { 3, 9, 1, 3, 8, 9, 7,11,10, 7,10, 5},
  380.         new int[] { 9, 1, 0,10, 7,11,10, 5, 7},
  381.         new int[] { 3, 8, 0, 7,10, 5, 7,11,10},
  382.         new int[] {11, 5, 7,11,10, 5},
  383.         new int[] {10, 6, 5},
  384.         new int[] { 8, 3, 0,10, 6, 5},
  385.         new int[] { 0, 1, 9, 5,10, 6},
  386.         new int[] {10, 6, 5, 9, 8, 3, 9, 3, 1},
  387.         new int[] { 1, 2, 6, 1, 6, 5},
  388.         new int[] { 0, 8, 3, 2, 6, 5, 2, 5, 1},
  389.         new int[] { 5, 9, 6, 9, 0, 6, 6, 0, 2},
  390.         new int[] { 9, 6, 5, 3, 6, 9, 3, 9, 8, 3, 2, 6},
  391.         new int[] { 3,11, 2,10, 6, 5},
  392.         new int[] { 6, 5,10, 2, 0, 8, 2, 8,11},
  393.         new int[] { 1, 9, 0, 6, 5,10,11, 2, 3},
  394.         new int[] { 1,10, 2, 5, 9, 6, 9,11, 6, 9, 8,11},
  395.         new int[] {11, 6, 3, 6, 5, 3, 3, 5, 1},
  396.         new int[] { 0, 5, 1, 0,11, 5, 5,11, 6, 0, 8,11},
  397.         new int[] { 0, 5, 9, 0, 3, 5, 3, 6, 5, 3,11, 6},
  398.         new int[] { 5, 9, 6, 6, 9,11, 9, 8,11},
  399.         new int[] {10, 6, 5, 4, 7, 8},
  400.         new int[] { 5,10, 6, 7, 3, 0, 7, 0, 4},
  401.         new int[] { 5,10, 6, 0, 1, 9, 8, 4, 7},
  402.         new int[] { 4, 5, 9, 6, 7,10, 7, 1,10, 7, 3, 1},
  403.         new int[] { 7, 8, 4, 5, 1, 2, 5, 2, 6},
  404.         new int[] { 4, 1, 0, 4, 5, 1, 6, 7, 3, 6, 3, 2},
  405.         new int[] { 9, 4, 5, 8, 0, 7, 0, 6, 7, 0, 2, 6},
  406.         new int[] { 4, 5, 9, 6, 3, 2, 6, 7, 3},
  407.         new int[] { 7, 8, 4, 2, 3,11,10, 6, 5},
  408.         new int[] {11, 6, 7,10, 2, 5, 2, 4, 5, 2, 0, 4},
  409.         new int[] {11, 6, 7, 8, 0, 3, 1,10, 2, 9, 4, 5},
  410.         new int[] { 6, 7,11, 1,10, 2, 9, 4, 5},
  411.         new int[] { 6, 7,11, 4, 5, 8, 5, 3, 8, 5, 1, 3},
  412.         new int[] { 6, 7,11, 4, 1, 0, 4, 5, 1},
  413.         new int[] { 4, 5, 9, 3, 8, 0,11, 6, 7},
  414.         new int[] { 9, 4, 5, 7,11, 6},
  415.         new int[] {10, 6, 4,10, 4, 9},
  416.         new int[] { 8, 3, 0, 9,10, 6, 9, 6, 4},
  417.         new int[] { 1,10, 0,10, 6, 0, 0, 6, 4},
  418.         new int[] { 8, 6, 4, 8, 1, 6, 6, 1,10, 8, 3, 1},
  419.         new int[] { 9, 1, 4, 1, 2, 4, 4, 2, 6},
  420.         new int[] { 1, 0, 9, 3, 2, 8, 2, 4, 8, 2, 6, 4},
  421.         new int[] { 2, 4, 0, 2, 6, 4},
  422.         new int[] { 3, 2, 8, 8, 2, 4, 2, 6, 4},
  423.         new int[] { 2, 3,11, 6, 4, 9, 6, 9,10},
  424.         new int[] { 0,10, 2, 0, 9,10, 4, 8,11, 4,11, 6},
  425.         new int[] {10, 2, 1,11, 6, 3, 6, 0, 3, 6, 4, 0},
  426.         new int[] {10, 2, 1,11, 4, 8,11, 6, 4},
  427.         new int[] { 1, 4, 9,11, 4, 1,11, 1, 3,11, 6, 4},
  428.         new int[] { 0, 9, 1, 4,11, 6, 4, 8,11},
  429.         new int[] {11, 6, 3, 3, 6, 0, 6, 4, 0},
  430.         new int[] { 8, 6, 4, 8,11, 6},
  431.         new int[] { 6, 7,10, 7, 8,10,10, 8, 9},
  432.         new int[] { 9, 3, 0, 6, 3, 9, 6, 9,10, 6, 7, 3},
  433.         new int[] { 6, 1,10, 6, 7, 1, 7, 0, 1, 7, 8, 0},
  434.         new int[] { 6, 7,10,10, 7, 1, 7, 3, 1},
  435.         new int[] { 7, 2, 6, 7, 9, 2, 2, 9, 1, 7, 8, 9},
  436.         new int[] { 1, 0, 9, 3, 6, 7, 3, 2, 6},
  437.         new int[] { 8, 0, 7, 7, 0, 6, 0, 2, 6},
  438.         new int[] { 2, 7, 3, 2, 6, 7},
  439.         new int[] { 7,11, 6, 3, 8, 2, 8,10, 2, 8, 9,10},
  440.         new int[] {11, 6, 7,10, 0, 9,10, 2, 0},
  441.         new int[] { 2, 1,10, 7,11, 6, 8, 0, 3},
  442.         new int[] { 1,10, 2, 6, 7,11},
  443.         new int[] { 7,11, 6, 3, 9, 1, 3, 8, 9},
  444.         new int[] { 9, 1, 0,11, 6, 7},
  445.         new int[] { 0, 3, 8,11, 6, 7},
  446.         new int[] {11, 6, 7},
  447.         new int[] {11, 7, 6},
  448.         new int[] { 0, 8, 3,11, 7, 6},
  449.         new int[] { 9, 0, 1,11, 7, 6},
  450.         new int[] { 7, 6,11, 3, 1, 9, 3, 9, 8},
  451.         new int[] { 1, 2,10, 6,11, 7},
  452.         new int[] { 2,10, 1, 7, 6,11, 8, 3, 0},
  453.         new int[] {11, 7, 6,10, 9, 0,10, 0, 2},
  454.         new int[] { 7, 6,11, 3, 2, 8, 8, 2,10, 8,10, 9},
  455.         new int[] { 2, 3, 7, 2, 7, 6},
  456.         new int[] { 8, 7, 0, 7, 6, 0, 0, 6, 2},
  457.         new int[] { 1, 9, 0, 3, 7, 6, 3, 6, 2},
  458.         new int[] { 7, 6, 2, 7, 2, 9, 2, 1, 9, 7, 9, 8},
  459.         new int[] { 6,10, 7,10, 1, 7, 7, 1, 3},
  460.         new int[] { 6,10, 1, 6, 1, 7, 7, 1, 0, 7, 0, 8},
  461.         new int[] { 9, 0, 3, 6, 9, 3, 6,10, 9, 6, 3, 7},
  462.         new int[] { 6,10, 7, 7,10, 8,10, 9, 8},
  463.         new int[] { 8, 4, 6, 8, 6,11},
  464.         new int[] {11, 3, 6, 3, 0, 6, 6, 0, 4},
  465.         new int[] { 0, 1, 9, 4, 6,11, 4,11, 8},
  466.         new int[] { 1, 9, 4,11, 1, 4,11, 3, 1,11, 4, 6},
  467.         new int[] {10, 1, 2,11, 8, 4,11, 4, 6},
  468.         new int[] {10, 1, 2,11, 3, 6, 6, 3, 0, 6, 0, 4},
  469.         new int[] { 0, 2,10, 0,10, 9, 4,11, 8, 4, 6,11},
  470.         new int[] { 2,11, 3, 6, 9, 4, 6,10, 9},
  471.         new int[] { 3, 8, 2, 8, 4, 2, 2, 4, 6},
  472.         new int[] { 2, 0, 4, 2, 4, 6},
  473.         new int[] { 1, 9, 0, 3, 8, 2, 2, 8, 4, 2, 4, 6},
  474.         new int[] { 9, 4, 1, 1, 4, 2, 4, 6, 2},
  475.         new int[] { 8, 4, 6, 8, 6, 1, 6,10, 1, 8, 1, 3},
  476.         new int[] { 1, 0,10,10, 0, 6, 0, 4, 6},
  477.         new int[] { 8, 0, 3, 9, 6,10, 9, 4, 6},
  478.         new int[] {10, 4, 6,10, 9, 4},
  479.         new int[] { 9, 5, 4, 7, 6,11},
  480.         new int[] { 4, 9, 5, 3, 0, 8,11, 7, 6},
  481.         new int[] { 6,11, 7, 4, 0, 1, 4, 1, 5},
  482.         new int[] { 6,11, 7, 4, 8, 5, 5, 8, 3, 5, 3, 1},
  483.         new int[] { 6,11, 7, 1, 2,10, 9, 5, 4},
  484.         new int[] {11, 7, 6, 8, 3, 0, 1, 2,10, 9, 5, 4},
  485.         new int[] {11, 7, 6,10, 5, 2, 2, 5, 4, 2, 4, 0},
  486.         new int[] { 7, 4, 8, 2,11, 3,10, 5, 6},
  487.         new int[] { 4, 9, 5, 6, 2, 3, 6, 3, 7},
  488.         new int[] { 9, 5, 4, 8, 7, 0, 0, 7, 6, 0, 6, 2},
  489.         new int[] { 4, 0, 1, 4, 1, 5, 6, 3, 7, 6, 2, 3},
  490.         new int[] { 7, 4, 8, 5, 2, 1, 5, 6, 2},
  491.         new int[] { 4, 9, 5, 6,10, 7, 7,10, 1, 7, 1, 3},
  492.         new int[] { 5, 6,10, 0, 9, 1, 8, 7, 4},
  493.         new int[] { 5, 6,10, 7, 0, 3, 7, 4, 0},
  494.         new int[] {10, 5, 6, 4, 8, 7},
  495.         new int[] { 5, 6, 9, 6,11, 9, 9,11, 8},
  496.         new int[] { 0, 9, 5, 0, 5, 3, 3, 5, 6, 3, 6,11},
  497.         new int[] { 0, 1, 5, 0, 5,11, 5, 6,11, 0,11, 8},
  498.         new int[] {11, 3, 6, 6, 3, 5, 3, 1, 5},
  499.         new int[] { 1, 2,10, 5, 6, 9, 9, 6,11, 9,11, 8},
  500.         new int[] { 1, 0, 9, 6,10, 5,11, 3, 2},
  501.         new int[] { 6,10, 5, 2, 8, 0, 2,11, 8},
  502.         new int[] { 3, 2,11,10, 5, 6},
  503.         new int[] { 9, 5, 6, 3, 9, 6, 3, 8, 9, 3, 6, 2},
  504.         new int[] { 5, 6, 9, 9, 6, 0, 6, 2, 0},
  505.         new int[] { 0, 3, 8, 2, 5, 6, 2, 1, 5},
  506.         new int[] { 1, 6, 2, 1, 5, 6},
  507.         new int[] {10, 5, 6, 9, 3, 8, 9, 1, 3},
  508.         new int[] { 0, 9, 1, 5, 6,10},
  509.         new int[] { 8, 0, 3,10, 5, 6},
  510.         new int[] {10, 5, 6},
  511.         new int[] {11, 7, 5,11, 5,10},
  512.         new int[] { 3, 0, 8, 7, 5,10, 7,10,11},
  513.         new int[] { 9, 0, 1,10,11, 7,10, 7, 5},
  514.         new int[] { 3, 1, 9, 3, 9, 8, 7,10,11, 7, 5,10},
  515.         new int[] { 2,11, 1,11, 7, 1, 1, 7, 5},
  516.         new int[] { 0, 8, 3, 2,11, 1, 1,11, 7, 1, 7, 5},
  517.         new int[] { 9, 0, 2, 9, 2, 7, 2,11, 7, 9, 7, 5},
  518.         new int[] {11, 3, 2, 8, 5, 9, 8, 7, 5},
  519.         new int[] {10, 2, 5, 2, 3, 5, 5, 3, 7},
  520.         new int[] { 5,10, 2, 8, 5, 2, 8, 7, 5, 8, 2, 0},
  521.         new int[] { 9, 0, 1,10, 2, 5, 5, 2, 3, 5, 3, 7},
  522.         new int[] { 1,10, 2, 5, 8, 7, 5, 9, 8},
  523.         new int[] { 1, 3, 7, 1, 7, 5},
  524.         new int[] { 8, 7, 0, 0, 7, 1, 7, 5, 1},
  525.         new int[] { 0, 3, 9, 9, 3, 5, 3, 7, 5},
  526.         new int[] { 9, 7, 5, 9, 8, 7},
  527.         new int[] { 4, 5, 8, 5,10, 8, 8,10,11},
  528.         new int[] { 3, 0, 4, 3, 4,10, 4, 5,10, 3,10,11},
  529.         new int[] { 0, 1, 9, 4, 5, 8, 8, 5,10, 8,10,11},
  530.         new int[] { 5, 9, 4, 1,11, 3, 1,10,11},
  531.         new int[] { 8, 4, 5, 2, 8, 5, 2,11, 8, 2, 5, 1},
  532.         new int[] { 3, 2,11, 1, 4, 5, 1, 0, 4},
  533.         new int[] { 9, 4, 5, 8, 2,11, 8, 0, 2},
  534.         new int[] {11, 3, 2, 9, 4, 5},
  535.         new int[] { 3, 8, 4, 3, 4, 2, 2, 4, 5, 2, 5,10},
  536.         new int[] {10, 2, 5, 5, 2, 4, 2, 0, 4},
  537.         new int[] { 0, 3, 8, 5, 9, 4,10, 2, 1},
  538.         new int[] { 2, 1,10, 9, 4, 5},
  539.         new int[] { 4, 5, 8, 8, 5, 3, 5, 1, 3},
  540.         new int[] { 5, 0, 4, 5, 1, 0},
  541.         new int[] { 3, 8, 0, 4, 5, 9},
  542.         new int[] { 9, 4, 5},
  543.         new int[] { 7, 4,11, 4, 9,11,11, 9,10},
  544.         new int[] { 3, 0, 8, 7, 4,11,11, 4, 9,11, 9,10},
  545.         new int[] {11, 7, 4, 1,11, 4, 1,10,11, 1, 4, 0},
  546.         new int[] { 8, 7, 4,11, 1,10,11, 3, 1},
  547.         new int[] { 2,11, 7, 2, 7, 1, 1, 7, 4, 1, 4, 9},
  548.         new int[] { 3, 2,11, 4, 8, 7, 9, 1, 0},
  549.         new int[] { 7, 4,11,11, 4, 2, 4, 0, 2},
  550.         new int[] { 2,11, 3, 7, 4, 8},
  551.         new int[] { 2, 3, 7, 2, 7, 9, 7, 4, 9, 2, 9,10},
  552.         new int[] { 4, 8, 7, 0,10, 2, 0, 9,10},
  553.         new int[] { 2, 1,10, 0, 7, 4, 0, 3, 7},
  554.         new int[] {10, 2, 1, 8, 7, 4},
  555.         new int[] { 9, 1, 4, 4, 1, 7, 1, 3, 7},
  556.         new int[] { 1, 0, 9, 8, 7, 4},
  557.         new int[] { 3, 4, 0, 3, 7, 4},
  558.         new int[] { 8, 7, 4},
  559.         new int[] { 8, 9,10, 8,10,11},
  560.         new int[] { 0, 9, 3, 3, 9,11, 9,10,11},
  561.         new int[] { 1,10, 0, 0,10, 8,10,11, 8},
  562.         new int[] {10, 3, 1,10,11, 3},
  563.         new int[] { 2,11, 1, 1,11, 9,11, 8, 9},
  564.         new int[] {11, 3, 2, 0, 9, 1},
  565.         new int[] {11, 0, 2,11, 8, 0},
  566.         new int[] {11, 3, 2},
  567.         new int[] { 3, 8, 2, 2, 8,10, 8, 9,10},
  568.         new int[] { 9, 2, 0, 9,10, 2},
  569.         new int[] { 8, 0, 3, 1,10, 2},
  570.         new int[] {10, 2, 1},
  571.         new int[] { 8, 1, 3, 8, 9, 1},
  572.         new int[] { 9, 1, 0},
  573.         new int[] { 8, 0, 3},
  574.         new int[] {}
  575.     };
  576. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement