{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Perlin noise\n",
    "\n",
    "Author: Sebastian Spreizer\n",
    "\n",
    "The MIT License"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import noise\n",
    "import numpy as np\n",
    "\n",
    "import lib.connectivity_map as cm\n",
    "import lib.colormap as cmap"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "nrow = 100\n",
    "size = 4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAASwAAAD+CAYAAACA/DjlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO2de6weZ33nP79zjmMbQy7GkKaxgaSEi4OAoEDDpltFSasNF5GqRQG2i7LdVFltaUi4lAD/NPtHtXRVARHbUlmBKpVQLk2iTVSalCqJJbILVhKCCiGEdQMBRwnBjROzXsf2sX/7x/tOPGc8l2dmnrkdfz/Skc/7nnlnfu/M+Jnv87s95u4IIcQUWBjaACGECEUDlhBiMmjAEkJMBg1YQojJoAFLCDEZNGAJISZDbwOWmV1sZo+Z2U4z+3Rfxw3FzLaY2X1m9gMze8TMrpq/v9HM/snM/s/831OGtjXBzBbN7GEz+/v56zPMbMf8HN9sZicMbWOCmZ1sZrea2Q/N7FEze+dYz62ZfWx+D3zfzG40s3VjPrfHE70MWGa2CPwl8C5gK/AhM9vax7FrsAx8wt23AucBH5nb+GngHnc/C7hn/nosXAU8mnr958AX3P21wB7g8kGsyuc64G53fwPwFmZ2j+7cmtnpwEeBc939TcAi8EHGfW6P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/t0G9vaKKx3ADvd/fG5UTcBlwA/KPrA8klrefbi146y+LPNStN1vk+eEzVRXcej0gqhC2U1xnuwjLL7M/Z3MYwli6NaU8Lmt4FdwANmdqe7F44TZbQZsE4HfpZ6vQv49exGZnYFcAXACRtOaXE4IUQfLGCss2jR4trCpozGq+aY2fuBi939D+evPwz8urv/cclnfgHsA3Y3Omj/bGI6tsK07J2SrTAde1/t7q9oswMzu5vZ9w1hHfBC6vU2d9+W2lftcaKMNgrrSWBL6vXm+XuFuPsrzOzBPpcFasOUbIVp2TslW2F69rbB3S8e2oYi2kxUHwDOMrMzzOwE4IPAnXHMEkKsEmoLmzIaD1juvgz8MfCPwKPALe7+SNP9CSFWJVGFTas8LHf/B+Afan5sW/Umo2FKtsK07J2SrTA9e0eBuy+bWSJsFoGvthE2vS5VL4QQbVCKsBBiMmjAEkJMBg1YQojJoAFLCDEZNGAJISaDBiwhxGTQgCWEmAz/H2ozcQfxQKLTAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "landscape = cm.Perlin_uniform(nrow, size=size)\n",
    "landscape *= 2 * np.pi\n",
    "\n",
    "fig,ax = plt.subplots(1)\n",
    "im = ax.matshow(landscape.reshape(nrow,nrow), cmap=cmap.virno(), origin='bottom')\n",
    "cbar = plt.colorbar(im, ax=ax)\n",
    "cbar.set_ticks([0,3.14,6.28])\n",
    "cbar.set_ticklabels([0,'$\\pi$','$2\\pi$'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# azimuths = np.arange(0, 361)\n",
    "# zeniths = np.arange(1, 3)\n",
    "# values = azimuths * np.ones((2, 361))\n",
    "# fig, ax = plt.subplots(subplot_kw=dict(projection='polar'))\n",
    "# ax.pcolormesh(azimuths*np.pi/180.0, zeniths, values, cmap=cmap.virno())\n",
    "# ax.set_yticks([])\n",
    "# ax.set_xticks([0, np.pi/2, np.pi, np.pi*3/2])\n",
    "# ax.set_xticklabels(['0', '$\\pi/2$', '$\\pi$', '$3/2\\pi$'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "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.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}