{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Basic Examples\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "from polymesh.grid import grid\nfrom polymesh.topo.tr import Q4_to_T3\nfrom dewloosh.plotly import plot_triangles_2d\nimport numpy as np\ngridparams = {\n    'size' : (1200, 600),\n    'shape' : (30, 15),\n    'eshape' : (2, 2),\n    'origo' : (0, 0),\n    'start' : 0\n}\ncoordsQ4, topoQ4 = grid(**gridparams)\npoints, triangles = Q4_to_T3(coordsQ4, topoQ4, path='grid')\nfig = plot_triangles_2d(points, np.random.rand(len(points)))\nfig"
      ]
    }
  ],
  "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.8.10"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}