JSPM

mandelbrot-points

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q28173F
  • License GPL-3.0

Get info at point level for the Mandelbrot set (any position, any scale)

Package Exports

  • mandelbrot-points

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mandelbrot-points) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Mandelbrot points

Get info at point level for the Mandelbrot set (any position, any scale).

Install

npm i mandelbrot-points

Use

const {getPoints} = require('mandelbrot-points');

const points = getPoints(
  -2,    // Min value on x axis to get info for
   2,    // Max value on x axis to get info for
  -1,    // Min value on y axis to get info for
   1,    // Max value on y axis to get info for
   0.01, // Step (related to scale): distance between points on same axis. 
   15,   // Max acceptable value (limit used to determine if function diverges or not)
   20    // Max num iterations per point
);

It returns an array of objects with the following structure:

{ x, y, iters }

Where (x, y) is the point location and iters is the number of iterations executed for the point before the function "diverged". If the function does not diverge iters will be equal to the max number of iterations passed as parameter.

Licence

GPL-3.0