{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from k3d import K3D\n", "import numpy\n", "\n", "Nx = 60\n", "Ny = 60\n", "xmin, xmax = -3, 3\n", "ymin, ymax = -0, 3\n", "\n", "x = numpy.linspace(xmin, xmax, Nx)\n", "y = numpy.linspace(ymin, ymax, Ny)\n", "x, y = numpy.meshgrid(x, y, indexing='ij')\n", "\n", "heights = numpy.sin(x**2 + y**2)\n", "\n", "plot = K3D()\n", "plot += K3D.surface(heights, xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax)\n", "plot.display()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }