This is an archival dump of old wiki content --- see scipy.org for current material.
Please see http://scipy-cookbook.readthedocs.org/

Attachment 'Simple_tvtk_cone.py'

Download

   1 from enthought.tvtk.api import tvtk
   2 cs = tvtk.ConeSource(resolution=100)
   3 mapper = tvtk.PolyDataMapper(input=cs.output)
   4 actor = tvtk.Actor(mapper=mapper)
   5 
   6 # create a renderer:
   7 renderer = tvtk.Renderer()
   8 # create a render window and hand it the renderer:
   9 render_window = tvtk.RenderWindow(size=(400,400))
  10 render_window.add_renderer(renderer)
  11 
  12 # create interactor and hand it the render window
  13 # This handles mouse interaction with window.
  14 interactor = tvtk.RenderWindowInteractor(render_window=render_window)
  15 renderer.add_actor(actor)
  16 interactor.initialize()
  17 interactor.start()

New Attachment

File to upload
Rename to
Overwrite existing attachment of same name

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.