Advertisement
Schoggi

Code

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