~ubuntu-branches/ubuntu/trusty/mayavi2/trusty

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.. _example_polydata:

Polydata example
--------------------------------------------


An example of how to generate a polydata dataset using numpy arrays.

The example is similar to tvtk/examples/tiny_mesh.py.  Also shown is a
way to visualize this data with mayavi2.  The script can be run like so::

  $ mayavi2 -x polydata.py

It can be alternatively run as::

  $ python polydata.py



**Python source code:** :download:`polydata.py`

.. literalinclude:: polydata.py
    :lines: 14-