Skip to content

Instantly share code, notes, and snippets.

@Jessime
Created March 29, 2020 04:26
Show Gist options
  • Save Jessime/745585c6c478ec89a042f0998f037f14 to your computer and use it in GitHub Desktop.
Save Jessime/745585c6c478ec89a042f0998f037f14 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2020-03-29T01:21:36.129340Z",
"start_time": "2020-03-29T01:21:34.989798Z"
}
},
"outputs": [],
"source": [
"import seaborn as sns\n",
"from itertools import cycle\n",
"import turtle\n",
"import numpy as np\n",
"import time"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2020-03-29T01:21:37.118757Z",
"start_time": "2020-03-29T01:21:36.131031Z"
}
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAtBJREFUeJzt3T1qVGEYhuH3TOYwOiH4l5goomBtpVmIbmLck2uyi40LCFhIwBUcC21szA98fPN8ua4qgSneh3CGe2Ag07IsBQAAiVa9DwAAgLsSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEWl/3gmmadlW1+/Pz6sNm3jY/qpfVwdz7hKam+do/d675oPcFTU3rsT93rsZ+9Go98KNXVbU+mHqf0NQ88L7Nauz3lnk19sM38r7Lyx91dfXrRg/fdJt/Z/twc7S8PXt/58P23YNnL3qf0NR8ctz7hGbWZ496n9DUfLrpfUJT2+djfxh5Mu6jV1VVJ4/HDqKXR+N+2np9eNj7hKZebZ/2PqGps+1p7xOa+fjpc11cfL9RzI79DgQAwNDELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALGmZVn+/4Jp2lXV7u+v76rqW+ujOjquqp+9j2hk5G1V9qWzL9fI26rsS2dfrjfLspzc5IXXxuw/L56mr8uynN/5rD038r6Rt1XZl86+XCNvq7IvnX33g68ZAAAQS8wCABDrtjH7pckV+2PkfSNvq7IvnX25Rt5WZV86++6BW31nFgAA9omvGQAAEEvMAgAQS8wCABBLzAIAEEvMAgAQ6zcfcWS94+9fhQAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAtpJREFUeJzt3T1qlFEYhuH3fPMTjMFEEhOSxtbCQtBVuAerwCzKNVmJiAsQsRDJDj4bGxvzAx9nnpPr6gJTvA+ZTO4JA2nzPBcAACSaeh8AAAAPJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiLW+7QGttV1V7aqqpja9PVg/WfyoXlarbe8TFtXWm94nLKZtbn0qR2vrVe8TFjVtxn5fPa1b7xMWNY3941frgb9/m9W426qqttPYry2badzfDT++/6yb3zd3eoK2+/w728Pt0fzq4s2DD9t3RydXvU9Y1MHpZe8TFrM5P+t9wqI258e9T1jU9mLcN8lVVYfn476RrKp6djZ2MJw+HzcYLo/H/iPO1dFh7xMWdfX0pPcJi/nw/rq+fv52p5gd+xUIAIChiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABitXme//+A1nZVtfv75euq+rL0UR2dVdWv3kcsZORtVfalsy/XyNuq7EtnX66X8zy/uMsDb43Zfx7c2qd5nt89+Kw9N/K+kbdV2ZfOvlwjb6uyL519j4OPGQAAEEvMAgAQ674x+3GRK/bHyPtG3lZlXzr7co28rcq+dPY9Avf6zCwAAOwTHzMAACCWmAUAIJaYBQAglpgFACCWmAUAINYfq+Vkvb0X0PMAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAtpJREFUeJzt3U1qFFEYheGvuiudhCQaQjf+DVyAmekm3IA7sBflmpwICs4FcSDqDsqJEyfmBy63z/V5ZoEafIcQeLspyLQsSwEAQKJV7wMAAOC+xCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAseabHpimaV9V+6qq1bR6eTKfND+ql3m96X1CU6v1Ue8TmlnN426rqprmG/9Uo03zuvcJTa2Oxt43zVPvE5paD7xvHnhbVdW8Hvs7u6P1uL+/b1++1q8fP281cLrLv7M925wt17sX9z7s0F0+eNb7hKbOL5/2PqGZk+2T3ic0tdlte5/Q1Gb3sPcJTR0/Ou99QlOnu3G/5KiqutiO+2H56mrcbVVVu8vj3ic09fjitPcJzbx9/aY+f/h0q5gd+yMLAABDE7MAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEmpZl+fcD07Svqv2fH6+r6mProzraVtX33kc0MvK2KvvS2Zdr5G1V9qWzL9fzZVl2t3nwxpj96+Fper8sy6t7n3XgRt438rYq+9LZl2vkbVX2pbPv/+A1AwAAYolZAABi3TVm3zW54nCMvG/kbVX2pbMv18jbquxLZ99/4E7vzAIAwCHxmgEAALHELAAAscQsAACxxCwAALHELAAAsX4DTwRkvULGI6AAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAtdJREFUeJzt3b1qFVEYheFv5kx+SSQmJypa2FkJFnoRNl6FcC7Ka7JRLOy1sJDgHYyNjY35gc3O2j5PF5jiWxwCbw4DmdZ1LQAASDT3PgAAAO5KzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQa7nugWmadlW1q6qap+n10XLY/Khelnmv9wlNLZtx982b/d4nNDUv1/6qRht93zT4vnlv0/uEpuZl3O995mXqfUJTm4E/u6qqZTPu5/fj+7f6dXV1o4HTbf6d7cn+8fpq++LOh91329MnvU9o6uzB094nNHP68FnvE5o6On/c+4SmDi+2vU9o6vDRRe8Tmjq4PO19QlPH2+PeJzRzcjnuF1RVVWfnB71PaOribNwvct6/e1tfP3+6UcyO/ScLAABDE7MAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEmtZ1/fcD07Srqt2fH19W1ZfWR3W0raqfvY9oZORtVfalsy/XyNuq7EtnX67n67pe3uTBa2P2r4en6eO6rm/ufNY9N/K+kbdV2ZfOvlwjb6uyL519/wevGQAAEEvMAgAQ67Yx+6HJFffHyPtG3lZlXzr7co28rcq+dPb9B271ziwAANwnXjMAACCWmAUAIJaYBQAglpgFACCWmAUAINZv2mRkvYvvKlcAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAtBJREFUeJzt3T9qVFEYxuHvzlxj4pAYM4kRG12AhaC9i7ByA7Mo1yTYxA0IWilZwrWxsTF/4HDmPXmeLnCL7yVk+CVcyLQsSwEAQKJV7wMAAOC+xCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAseabHpimaVdVu6qq1TS9ezIfND+ql3n1qPcJTc3rcfeNvK2qaj34vtX6xo+iaKt58O/fvO59QlMj7xt5W1XVah77b3breep9QjM/f3yv6+vftxo43eXf2R4fHC5vL17f9669d7l53vuEprbHl71PaObs6cveJzR1cvqi9wlNbZ6N/bO32Y6972h71vuEpg7PT3uf0Mzm4rj3CU1tzo96n9DUyfZx7xOa+fTxQ327+nqrmB37VxYAAIYmZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIg1Lcvy/wemaVdVu79fvqmqq9ZHdXReVb96H9HIyNuq7EtnX66Rt1XZl86+XK+WZbm4zYM3xuw/D0/Tl2VZ3t/7rD038r6Rt1XZl86+XCNvq7IvnX0Pg9cMAACIJWYBAIh115j93OSK/THyvpG3VdmXzr5cI2+rsi+dfQ/And6ZBQCAfeI1AwAAYolZAABiiVkAAGKJWQAAYolZAABi/QEYS2S9rOUyNwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAtVJREFUeJzt3U2KE1EUhuFzK9UKsY12k2515AYcCLoBx+7ABWRRrkkQRDcg4sifJVwnTpzYP1BUvtvPMwvcwTlUkXoJBWm99wIAgETT2gMAAMBtiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYs1XHWitHarqUFU1tfZqO58sPtRaTqbN2iMsat5cebljzZtx78uqqnkae7/NPO69WVW1Gfz+nAa/ftNm3GfDdDL4tZvHvXZVVdM87m+S375/rV+/f7brnG03+Tvbh/fu95eXz2492LF7enq+9giLujzdrz3CYi52T9YeYVFnu8u1R1jU40dj77c7H/v+PD0b97ulqmp7Pu6zYXtxtvYIi9rud2uPsKjt/sHaIyzm7bs39enLx2vF7LhJDwDA8MQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAsVrv/f8HWjtU1eHvxxdV9XnpoVa0r6ofaw+xkJF3q7JfOvvlGnm3Kvuls1+u5733i+scvDJm/znc2ofe++tbj3XkRt5v5N2q7JfOfrlG3q3Kfunsdzd4zQAAgFhiFgCAWDeN2feLTHE8Rt5v5N2q7JfOfrlG3q3Kfunsdwfc6J1ZAAA4Jl4zAAAglpgFACCWmAUAIJaYBQAglpgFACDWH+FcZL1SVgmBAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAArtJREFUeJzt3T2KU2EYhuH3JBkhMImJyeh0bkCw0BVYuwXbLMo1CYKICxCxUnEHn42NjfmBw8nzzXV1A2fgfcjAuYvADK21AgCARLOpDwAAgEuJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiLY49MAzDoaoOVVWzoV4tF0d/JdbNfD71CaPqed9i1u/fZVXVYm5fsnnv+zp+L1T1/fnNOv/s+t/X73v96/dv9fP3r+GUZ4dz/p3t7aOb9vJ+f/Fh1+5+tZ76hFE9XW2mPmE0z9a7qU8Y1W7V974nj/vet93cTX3CqNabft8LVVWrbb/7bnf9bquqWu62U58wquW+3/f6m3dv6+OXTyfFrK8ZAAAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQa2it/f+BYThU1eHvjy+q6vPYR01oX1U/pj5iJD1vq7IvnX25et5WZV86+3I9b63dnfLg0Zj95+Fh+NBae33xWVeu5309b6uyL519uXreVmVfOvseBl8zAAAglpgFACDWuTH7fpQrrkfP+3reVmVfOvty9bytyr509j0AZ31nFgAAromvGQAAEEvMAgAQS8wCABBLzAIAEEvMAgAQ6w84RGS9aYx7GAAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAsBJREFUeJzt3T1uE1EYhtFvMo4AWY4tY6ehYAPpYAUsA3ovijUh0aAsgAIaEOzg0tDQ4B9pNH5vzukiTfG9cmQ9ikbK0ForAABIdDP3AQAAcCkxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAECsxbEHhmE4VNWhqupmqDfPb8fJj5rL7dh32y/Gnj+7frdV9f3ZVVWNne9bjEe/aqON9sUaF/1uq6q66X1fx7+bX79/q5+/fg+nPDuc8+9sl88W7eHV+uLDrt39ajn3CZO6v1vNfcJk9uu7uU+Y1G69mfuESW1737d5OfcJk1pvtnOfMKn1Zjf3CZNZbfdznzCp5bbfz66q6kXH+969/1CfHx9Pitm+/xQJAEDXxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxhtba/x8YhkNVHf7++FBVX6Y+aka7qvox9xET6XlblX3p7MvV87Yq+9LZl+t1a21/yoNHY/afh4fhU2vt7cVnXbme9/W8rcq+dPbl6nlblX3p7HsavGYAAEAsMQsAQKxzY/bjJFdcj5739bytyr509uXqeVuVfensewLOemcWAACuidcMAACIJWYBAIglZgEAiCVmAQCIJWYBAIj1B1d5ZL2XfWu1AAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAsdJREFUeJzt3TtuE1EYhuF/POYWETzGXCpES0EHq6BmDV5U1kSDlIIeIVEgYAdDQ0NDLtLR8XfyPF2kKf5PtqNXkaVM67oWAAAk2vQ+AAAAbkvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBre9UD0zQdq+pYVbWZ6t2D++P273Yed1vV2Pu227n3CU2N/NpVVc3z2K/fPF/5qzba6J+/zcCv3+jvzXl7r/cJTc3zuPu+fvteP3/9nq7z7HSTf2d79nBe37x6fOvDTt1hedT7hKYOu7PeJzRz2I/7vqyqerqc9z6hqWXZ9T6hqf1+3/uEppZl7H1PlkPvE5rZ7V/0PqGp89H3LS97n9DMh4/H+nz55VoxO/afewAAGJqYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAINa0ruv/H5imY1Ud//74tqouWx/V0bOq+tH7iEZG3lZlXzr7co28rcq+dPbler2u6/PrPHhlzP7z8DR9Wtf1/a3POnEj7xt5W5V96ezLNfK2KvvS2Xc3+JoBAACxxCwAALFuGrMXTa44HSPvG3lblX3p7Ms18rYq+9LZdwfc6DuzAABwSnzNAACAWGIWAIBYYhYAgFhiFgCAWGIWAIBYfwB6MmS9kEKL1QAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAs5JREFUeJzt3TuKFFEYhuG/pkp0RPvmNVOMzXQbxu6gF+WajEQDcxEDUVxBGWhi4lzgcPo78zzRDFTwf0z38DI0zLSuawEAQKKz3gcAAMB1iVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYi0XPTBN07Gqjn++rle3b4/bv/M87raqqnmZep/QzDLPvU9oal7Gfm2eDf7zW5YLf9VGO5vH3rcs474+5/lW7xOaGn/fuO+9r1++1c8fvy4VLtNV/p3t+fm8vnh+99qHnbrd/k7vE5raHc57n9DM7nCv9wlNbQ73e5/Q1Ga/7X1CU7vDvvcJTW12h94nNLXdPeh9QjO7/ZPeJzS13T7ufUJT+83T3ic08/bNsT59+HypmB37zz0AAAxNzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBrWtf1/w9M07Gqjn+/fVlVH1sf1dHDqvre+4hGRt5WZV86+3KNvK3KvnT25Xq2ruujyzx4Ycz+8/A0vV/X9fW1zzpxI+8beVuVfensyzXytir70tl3M/iYAQAAscQsAACxrhqz75pccTpG3jfytir70tmXa+RtVfals+8GuNJnZgEA4JT4mAEAALHELAAAscQsAACxxCwAALHELAAAsX4D7B9kvcqF6DIAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAsxJREFUeJzt3b1qVFEYheHvzBl/YhyTOBNtBAtbO70JLyKNxVyU12QjiNgLYiGSOzgW2tiYH9jsWTvPUyVwim8xMLyEA5mWZSkAAEi06n0AAADclpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAINb6qgemadpX1f7Pz/Xm/oNx+3e1HndbVdU88L7Veu59QlPz4PtW89j75vWVX7XR5tm+VPP6Xu8Tmlqvxv3sqqrW87if349v3+vy1+V0nWenm/w724dH8/Li1aNbH3boNtuj3ic09Xh73PuEZja7Te8TmjrenvQ+oanN2VnvE5rabLe9T2jqyemu9wlNnZ6c9z6hmaenz3uf0NR286z3CU3tBt73/t1Fff305VoxO+6f6gAAGJ6YBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAIJaYBQAglpgFACCWmAUAINa0LMv/H5imfVXt//76uqo+tz6qo11V/ex9RCMjb6uyL519uUbeVmVfOvtyvVyW5fw6D14Zs/88PE0fl2V5e+uzDtzI+0beVmVfOvtyjbytyr509t0NXjMAACCWmAUAINZNY/ZDkysOx8j7Rt5WZV86+3KNvK3KvnT23QE3emcWAAAOidcMAACIJWYBAIglZgEAiCVmAQCIJWYBAIj1G9EbZL1eQGecAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAsRJREFUeJzt3T1uE2EUhtE7zgQhYxkc2QkdFR0drIKCXeBFsSaqiIIFpKBAETv4KKChwT/SaPx+OadKpCnuK+fnUWQpQ2utAAAg0WLuAwAA4FxiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBY46EHhmHYV9X+z8f1fnx+NflRc1mMfbf9Yuz5tet3W1XVYjz4rRrt6qrzfd2/ftdznzCpnr8+x85fu+tFv69dVd/7fjw81K/Hx+GYZ4dT/p3ts+XY7t6uzj7s0i23L+Y+YVLL7XruEyaz3G3mPmFSy5ubuU+Y1GqznfuESa1v7uY+YVKvXt7OfcKkNut+9+3WfX9t3q76/tnyetXv74bPHz/V9/v7o2K27z9FAgDQNTELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBALDELAEAsMQsAQCwxCwBArKG19v8HhmFfVfu/n76rqm9THzWjbVX9nPuIifS8rcq+dPbl6nlblX3p7Mv1prW2O+bBgzH7z8PD8LW19uHssy5cz/t63lZlXzr7cvW8rcq+dPY9Dd5mAABALDELAECsU2P2yyRXXI6e9/W8rcq+dPbl6nlblX3p7HsCTnrPLAAAXBJvMwAAIJaYBQAglpgFACCWmAUAIJaYBQAg1m8zlmS9azpPewAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAstJREFUeJzt3T9qVFEYxuHvztzBEDIakwmOla2Fna7AFbgCy1lU1iRYKNgLYqPiDo6NjY35A5cz78nzdIEb+F4SLj/CQKbWWgEAQKJV7wMAAOC+xCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAseabHpim6VBVh6qqWtXr+dGN3xJrNY/d9tNm4J/detxtVVXredP7hEWt1mPvm+2LNq/Gfb9sBn93blbr3icsal6Pu+/7t6/1+9fP6TbPTnf5d7ab0027eHl+78OO3cnuce8TFnWyu+h9wmJOL696n7Cos4tnvU9Y1PbJvvcJi3p6/rz3CYu63I79+3l1Nu77Zb/d9T5hUfuzcZulqmq/3fY+YTHv372tL58+3ipmx/5TJAAAQxOzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxBKzAADEErMAAMQSswAAxJpaa/9/YJoOVXX4++Wrqvq89FEd7arqR+8jFjLytir70tmXa+RtVfalsy/Xi9ba1W0evDFm/3l4mj601t7c+6wjN/K+kbdV2ZfOvlwjb6uyL519D4OPGQAAEEvMAgAQ664xe73IFcdj5H0jb6uyL519uUbeVmVfOvsegDt9ZhYAAI6JjxkAABBLzAIAEEvMAgAQS8wCABBLzAIAEOsP5ipkvZYUXDAAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAtVJREFUeJzt3T1uE1EYheFvPHYIMolFlASShpaCDnr2QMMOvCjWhGiABVBAxc8ShoaGhvxIV9fn8jxdpIn0HbmYV5GlTMuyFAAAJFr1PgAAAO5LzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQS8wCABBLzAIAEEvMAgAQa33TA9M07atqX1VVq+nlfHzjr8RarefeJzQ1zZveJzQzr8fdVlU1D/zZVVXN81HvE5rarMb+/NbzuO+FqqrNatx9R/PY7731auy/2W3mcfd9/falfv76Md3m2eku/852vT1ads8v7n3YoXtwftb7hKYenl32PqGZR2fXvU9o6nQ39r7Hp2Pvuzy56n1CU0+2474XqqqutuO+G65Pdr1PaOrpybb3CU1d7I57n9DMm7ev6+PnD7eK2XGTHgCA4YlZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYolZAABiiVkAAGKJWQAAYk3Lsvz7gWnaV9X+z48vqupT66M6Oq+q772PaGTkbVX2pbMv18jbquxLZ1+uZ8uyXNzmwRtj9q+Hp+n9siyv7n3WgRt538jbquxLZ1+ukbdV2ZfOvv+DrxkAABBLzAIAEOuuMfuuyRWHY+R9I2+rsi+dfblG3lZlXzr7/gN3+s4sAAAcEl8zAAAglpgFACCWmAUAIJaYBQAglpgFACDWb7ItZL02/XFYAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAtZJREFUeJzt3U9qU1EYxuHv5iZaSZFoq9UWcerAma6hq3CcRbkmBwriBhRHFtzBdeLEif0Dh5P39HlmhTv4XkLglxDotCxLAQBAolXvAwAA4K7ELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACx1tc9ME3Tvqr2VVW1mt7NR5vWN3UzzeNuq6parcfdt54f9D6hqXk17mtXVbUZ/L33YPTXbzX3PqGpzWrc730287jbqqrW89T7hKbW63H3ff/5o65+X91o4HSbf2e73j5cjt9c3PmwQ3d0ctb7hKa2u5e9T2hmt3vV+4SmTo7Hfd9VVZ1tX/Q+oamL7fPeJzR1vn3S+4SmzrfHvU9o5vzxo94nNHW6G/uLjt3TcT8oX364rM/fvtwoZsf+SAYAwNDELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALHELAAAscQsAACxxCwAALGmZVn+/8A07atq//fPt1X1tfVRHZ1W1a/eRzQy8rYq+9LZl2vkbVX2pbMv1+tlWZ7d5MFrY/afh6fp07Is7+981oEbed/I26rsS2dfrpG3VdmXzr77wc8MAACIJWYBAIh125j92OSKwzHyvpG3VdmXzr5cI2+rsi+dfffArX4zCwAAh8TPDAAAiCVmAQCIJWYBAIglZgEAiCVmAQCI9QdNcGS9r3ocegAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArMAAABLCAYAAABjuQ9GAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAAttJREFUeJzt3T9qVFEYxuHv3plJTKIJwQSMRsXOwk4X4CIsrWdRrkmwCS5A0ErRHVwbGxvzBw5n3uPzdIFbfC9Mht+EgUzLshQAACSaex8AAAB3JWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiCVmAQCIJWYBAIglZgEAiLW+7oFpmrZVta2qqnl6Pe/vt76pm9V60/uEplarvd4nNLOex91WVbWZx35tbuZr34qi7c2r3ic0tbca++8im3nqfUIz6/W426qqVmO/tdS8Hvd378u3r/Xj188bvUCn2/w729XhwXL/5Ys7H7brjk4f9z6hqZPjy94nNHP+4GnvE5p6dHjR+4SmLg/Oep/Q1LOjk94nNPXk6KD3CU1dHI/7YfnsdOzaO3k49r7D83u9T2jm7ft39enz1Y1idtykBwBgeGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWGIWAIBYYhYAgFhiFgCAWNOyLP9+YJq2VbX98+OrqrpqfVRHZ1X1vfcRjYy8rcq+dPblGnlblX3p7Mv1fFmW85s8eG3M/vXwNH1cluXNnc/acSPvG3lblX3p7Ms18rYq+9LZ93/wNQMAAGKJWQAAYt02Zj80uWJ3jLxv5G1V9qWzL9fI26rsS2fff+BW35kFAIBd4msGAADEErMAAMQSswAAxBKzAADEErMAAMT6DaIAZL0L8Wk8AAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 864x72 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"for i in range(16):\n",
" sns.palplot(sns.cubehelix_palette(12, start=.5+i*.1, rot=-.8+i*.1)[::-1])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2020-03-29T01:24:12.048508Z",
"start_time": "2020-03-29T01:21:37.120279Z"
}
},
"outputs": [],
"source": [
"def draw(t, width, color_cycle):\n",
" if width>=1:\n",
" color = next(color_cycle)\n",
" t.pencolor(color)\n",
" s=t.pensize()\n",
" t.pensize(width)\n",
" t.fd(width*9)\n",
" t.rt(20)\n",
" draw(t, width*.75, color_cycle)\n",
" t.lt(40)\n",
" draw(t, width*.75, color_cycle)\n",
" t.right(20)\n",
" t.bk(width*9)\n",
" t.pensize(width)\n",
" \n",
"t=turtle.Turtle()\n",
"t.speed(0)\n",
"t.ht()\n",
"turtle.bgcolor(\"black\")\n",
"width = [6, 8, 10]\n",
"level_rot = [45, 22.5, 0]\n",
"rotation = [90, 90, 45]\n",
"n_trees = [4, 4, 8]\n",
"color_increment = iter(np.linspace(0, 1.8, 16))\n",
"# time.sleep(60) #Gives me time to set up screen capture\n",
"for w, lr, r, n in zip(width, level_rot, rotation, n_trees):\n",
" for i in range(n):\n",
" c = next(color_increment)\n",
" color_cycle = cycle(sns.cubehelix_palette(8, start=.5+c, rot=-.75+c))\n",
" draw(t, w, color_cycle)\n",
" t.rt(r)\n",
" t.rt(lr)\n",
"turtle.bye()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Use screen capture to record the video, then speed it up (and make the file size smaller) with:\n",
"\n",
"```\n",
"ffmpeg -i Untitled.mov -filter:v \"setpts=PTS/20\" turtle_tree.mp4\n",
"```"
]
},
{
"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.7.3"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": true,
"sideBar": true,
"skip_h1_title": false,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment