demo/delaunay.generate.js
function fibonacci( num, scale, offset, smooth ) {
  if (!smooth) smooth = 0;
  var b = Math.round( smooth * Math.sqrt( num ) );
  var phi = (Math.sqrt( 5 ) + 1) / 2;
  var pts = [];
  for (var i = 0; i < num; i++) {
    var r = (i > num - b) ? 1 : Math.sqrt( i - 0.5 ) / Math.sqrt( num - (b + 1) / 2 );
    var theta = 2 * Math.PI * i / (phi * phi);
    pts.push( new Vector( r * scale * Math.cos( theta ), r * scale * Math.sin( theta ) ).add( offset ) );
  }
  return pts;
}
function fibonacci( num, scale, offset, smooth ) {
  if (!smooth) smooth = 0;
  var b = Math.round( smooth * Math.sqrt( num ) );
  var phi = (Math.sqrt( 5 ) + 1) / 2;
  var pts = [];
  for (var i = 0; i < num; i++) {
    var r = (i > num - b) ? 1 : Math.sqrt( i - 0.5 ) / Math.sqrt( num - (b + 1) / 2 );
    var theta = 2 * Math.PI * i / (phi * phi);
    pts.push( new Vector( r * scale * Math.cos( theta ), r * scale * Math.sin( theta ) ).add( offset ) );
  }
  return pts;
}
function fibonacci ( num , scale , offset , smooth ) { if ( ! smooth ) smooth = 0 ; var b = Math . round ( smooth * Math . sqrt ( num ) ) ; var phi = ( Math . sqrt ( 5 ) + 1 ) / 2 ; var pts = [ ] ; for ( var i = 0 ; i < num ; i ++ ) { var r = ( i > num - b ) ? 1 : Math . sqrt ( i - 0.5 ) / Math . sqrt ( num - ( b + 1 ) / 2 ) ; var theta = 2 * Math . PI * i / ( phi * phi ) ; pts . push ( new Vector ( r * scale * Math . cos ( theta ) , r * scale * Math . sin ( theta ) ) . add ( offset ) ) ; } return pts ; }
Generate fibonacci spiral points
Generate fibonacci spiral points