{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": true, "input": [ "%pylab inline\n", "%autoreload 2\n", "import equidecompose as e\n", "\n", "# JSAnimation import available at https://github.com/jakevdp/JSAnimation\n", "from JSAnimation import IPython_display" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Populating the interactive namespace from numpy and matplotlib\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Triangle -> Rectangle" ] }, { "cell_type": "code", "collapsed": false, "input": [ "tri = e.axis_align(e.random_triangle()).reset_transform()\n", "rect = e.tri2rect(tri)\n", "e.animate(rect, 30)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "\n", "\n", "\n", "