title: How can I append elements to a 3-dimensional array in Processing (v. 3.4)?
body: <p>I am creating a program to render 3D graphics. I have a 3D array 'shapes' which contains all of the polygons to render. It is an array of polygons, where each polygon is itself an array of points, and each point is an array of 3 integer values (x, y, z co-ordinates). I have tried and failed to use the append() function. How else can I get it to work?</p>
  
  <p>I've tried using the append() function, but this seems to not work with multidimensional arrays.</p>
  
  <pre><code>int[][][] addPolyhedron(int[][][] shapes, int[][][] polyhedron)
  {
      for(int i = 0; i &lt; polyhedron.length; i ++)
      {
          shapes = append(shapes, polyhedron[i]);
      {
      return shapes;
  }
  </code></pre>
  
  <p>I wanted this to extend the array shapes to include all of the polygons in the array polyhedron. However, I receive an error message saying 'type mismatch, "java.lang.Object" does not match with "int[][][]".' Thanks in advance.</p>