

.. _example_tvtk_in_mayavi:

Tvtk in mayavi example
--------------------------------------------------------------------


An example of pure TVTK programming to build TVTK objects, which are then
added to a Mayavi scene.

This example show how pure TVTK objects can be added to a Mayavi scene.

This programming style does not allow to benefit from the data-management
facilities of Mayavi (the pipeline, the data-oriented mlab functions),
but it allows to easily reuse VTK code together with Mayavi or mlab code.


.. image:: ../generated_images/example_tvtk_in_mayavi.jpg
    :align: center



**Source code:** :download:`tvtk_in_mayavi.py`

.. literalinclude:: tvtk_in_mayavi.py
    :lines: 11-


    