• Produces an Archimedean spiral. It's a generator.

    const s = spiral(0.1, 1);
    for (const coord of s) {
    // Use Polar coord...
    if (coord.step === 1000) break; // Stop after 1000 iterations
    }

    Parameters

    • smoothness: number

      0.1 pretty rounded, at around 5 it starts breaking down

    • zoom: number

      At smoothness 0.1, zoom starting at 1 is OK

    Returns IterableIterator<Coord & {
        step: number;
    }>