{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from k3d import K3D\n", "\n", "plot = K3D()\n", "view_matrix = (\n", " (1.0, 0.0, 10.0, 0.0),\n", " (0.0, 1.0, 2.0, 0.0),\n", " (0.0, 0.0, 1.0, 0.0),\n", " (0.0, 0.0, 0.0, 1.0)\n", ")\n", "positions = (\n", " (-10, -15, 0),\n", " (-10, 5, 0),\n", " (10, 5, 0),\n", " (-10, -15, 0),\n", " (10, -15, 0),\n", " (-10, 5, 0),\n", " (0, 15, 0),\n", " (10, 5, 0),\n", " (10, -15, 0)\n", ")\n", "plot += K3D.line(view_matrix, positions, color=0xff0000, width=2.5)\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 }