Three.js shape from random points
<p>I have a N number of random points (in this case 20), with a X,Y and Z constrains.</p>

<p>How can I create ANY (preferably closed) shape (using Three.js library) , given and starting only from N random points.</p>

<p>There are probably many variants, please share yours.</p>

<pre><code>var program = new Program(reset,step)
program.add('g',false)
function reset() {
  scene.clear()
  scene.add(new THREE.GridHelper(100,1))
}
function step() {

}


program.startup()



var numpoints = 20;
var dots = []; //If you want to use for other task

for (var i = 0 ; i &lt; numpoints ; i++){
    var x = Math.random() * (80 - 1) + 1    //Math.random() * (max - min) + min
    var y = Math.random() * (80 - 1) + 1
    var z = Math.random() * (80 - 1) + 1

    var dotGeometry = new THREE.Geometry();
    dots.push(dotGeometry);
    dotGeometry.vertices.push(new THREE.Vector3( x, y, z));
    var dotMaterial = new THREE.PointsMaterial( { size: 3, sizeAttenuation: false, color: 0xFF0000 } );
    var dot = new THREE.Points( dotGeometry, dotMaterial );

    scene.add(dot);
}
</code></pre>

<p>Triangulation, Voronoi, I don't care, just show me ANY ideas you have, will help me learn a lot!</p>