title: How to draw a 2D/3D grid from BufferGeometry in three.js
body: <p>I have some points in a <code>BufferGeometry</code>. They arrange themselves into a regular 1D/2D/3D grid. I'm doing index mapping to higher dimensions, and moving the vertices dynamically so they end up in a proper spot relative to their neighbors (specifically, I'm visualizing a <a href="https://en.wikipedia.org/wiki/Self-organizing_map" rel="nofollow noreferrer">self-organizing map</a>).</p>
  
  <p><img src="https://i.stack.imgur.com/OjDR3.png" alt="2"></p>
  
  <p>I want to draw the connections between vertices, like the above picture. Doing that for 1D is straightforward enough because it's just a <code>new Line(myBufferGeometry)</code>, but how can the same be achieved for 2D and 3D? Do I have to create and update separate geometries for this, like make lots of 
  <code>LineSegments</code>? How can this be done efficiently? Or maybe is there some "magic" I can do, like with the <code>index</code> property?</p>