diff --git a/doc/apple-by-example.md b/doc/apple-by-example.md index 05cca7e94..2a7f0a3ab 100644 --- a/doc/apple-by-example.md +++ b/doc/apple-by-example.md @@ -1232,6 +1232,24 @@ in the NumPy ecosystem. nb/lorenz.html ``` +### Mandelbrot Set + +Apple has no support for complex numbers so we have to implement addition, +square, absolute value ourselves. + +Note the idiom + +``` +(frange _2.5 1 700) [(x,y)]⊗ (frange _1 1 400) + : Arr (700 × 400) (float * float) +``` + +to get a grid of tuples. + +```{.include} +nb/mandel.html +``` + ## Statistics Apple is capable of statistical computing, via the program suggested by [Ewart Shaw](https://www.jsoftware.com/papers/jhyper.pdf). diff --git a/docs/index.html b/docs/index.html index fedc4af13..ae45c100f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -395,6 +395,8 @@

Apple by Example

  • Random Walks
  • Lorenz Attractor
  • +
  • Mandelbrot +Set
  • Statistics