title: Can anyone explain me calculation formula of this code
body: <p>This code display data in grid format.Can anyone explain how they do this math formula.Since i am new to threejs framework.I never get it how it show the grid use this calculation. </p>
  
  <pre><code>let targets = {simple: [], grid: []};
  function generateGeometricLayouts() {
  for (let i = 0, l = targets.simple.length; i &lt; l; i++) {
          addGridObject(i);
  }
  }
  </code></pre>
  
  <p>//object</p>
  
  <pre><code>function addGridObject(index) {
  
      let object = new THREE.Object3D();
      object.position.x = ((index % 5) * 400) - 800;
      object.position.y = (-(Math.floor(index / 5) % 5) * 400) + 800;
      object.position.z = (Math.floor(index / 25)) * 1000 - 2000;
      targets.grid.push(object);
  
  }
  </code></pre>