• Fibonacci sphere algorithm. Generates points distributed on a sphere.

    Parameters

    • samples: number = 100
    • rotationRadians: number = 0
    • Optionalsphere: Sphere

    Returns IterableIterator<Point3d>

    for (const pt of sphereFibonacci(100)) {
    // pt.x, pt.y, pt.z
    }
    const sphere = { radius: 10, x: 10, y: 200 }
    const pts = [...sphereFibonacci(100, 0, sphere)];

    Source: https://codepen.io/elchininet/pen/vXeRyL