If you want to explore the complete code for the example you provided, you can find it at this link: http://jsfiddle.net/9XGuK/4/
Specifically, take a look at this segment from the example:
var vector = new THREE.Vector3();
for ( var i = 0, l = objects.length; i < l; i ++ ) {
var phi = Math.acos( -1 + ( 2 * i ) / l );
var theta = Math.sqrt( l * Math.PI ) * phi;
var object = new THREE.Object3D();
object.position.x = 800 * Math.cos( theta ) * Math.sin( phi );
object.position.y = 800 * Math.sin( theta ) * Math.sin( phi );
object.position.z = 800 * Math.cos( phi );
vector.copy( object.position ).multiplyScalar( 2 );
object.lookAt( vector );
targets.sphere.push( object );
}
You may want to try implementing this code on your local environment to gain a better understanding of its functionality, and then customize it to fit your specific requirements.