{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\nSparsity over the Mandelbrot set\n=========================================\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Some setup\n--------------\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import matplotlib.pyplot as plt\nimport chaoseverywhere as chaos"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Sparsity\n--------------------\n\nThe use of projecting non-zeros values over an area to determine its area is very well known (it's even how most of us learn the Monte-Carlo algorithm to calculate an approximation of pi).\nLet's say someone needs to do the same process with the Mandelbrot set. Then, a simple way to graphically overset the two objets is like below.\n\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "fig = plt.figure()\nmandel = chaos.Mandelbrot_disp(-.5,0,1.5).mandel_loop(go_up=True)\nplt.imshow(mandel, cmap='Spectral')\nchaos.sparse_matrix(400,400,.02)\nplt.show()"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Some values\n----------------------\nIt can be estimated that the Mandelbrot set has an area between $1.50$ and $1.51$.\nIt was proved by Mitsuhiro Shishikura that the Haussdorf dimension of the boundary of the Mandelbrot set equals $2$.\n\n\n\n"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.7.3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}