[Fwd: Returned mail: see transcript for details]

Travis Oliphant wrote:

    >> Fernando Perez wrote:
    >>> Hey Travis,
    >>>
    >>> my reply to you on the 3d plotting question bounced (your spam
    >>> filters don't like code attachments, it seems).
    >> Thanks for sending this to me. I had to change a few (if Z:
    >> checks) to make it work, but the demo ran nicely after that.
    >> Is this going to be included in matplotlib any time? What's
    >> the hold up?

    > I think John said he was very interested, but the
    > original author said he wanted to work on it some more
    > before including it. And that's the last I've heard on
    > the topic.

Last John Porter and I discussed this, he was interested in improving
the code before contributing it, but then started looking into VTK
solutions and may not be working on this anymore.

John: do you mind if we include your original matplotlib 3d code in
matplotlib under the mpl license? Are you continuing this work?

Thanks,
JDH

···

My vote would be to just include it: people can polish

    > it later, but SOME 3d functionality is better than none.

    > I'd suggest changing the mouse bindings to mimic the VTK
    > ones (zooming/panning/rotation), since at some point in
    > the future mpl may grow VTK support, and that's a
    > well-established convention. But that's a quick change
    > to make.

    > Cheers,

    > f

    > -------------------------------------------------------
    > This SF.net email is sponsored by: Splunk Inc. Do you
    > grep through log files for problems? Stop! Download
    > the new AJAX search engine that makes searching your log
    > files as easy as surfing the web. DOWNLOAD SPLUNK!
    > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
    > _______________________________________________
    > Matplotlib-devel mailing list
    > Matplotlib-devel@lists.sourceforge.net
    > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

John Hunter wrote:

"Fernando" == Fernando Perez <Fernando.Perez@...76...> writes:
           
   > Travis Oliphant wrote:
   >> Fernando Perez wrote:
   >>> Hey Travis,
   >>> >>> my reply to you on the 3d plotting question bounced (your spam
   >>> filters don't like code attachments, it seems).
   >> Thanks for sending this to me. I had to change a few (if Z:
   >> checks) to make it work, but the demo ran nicely after that.
   >> Is this going to be included in matplotlib any time? What's
   >> the hold up?

   > I think John said he was very interested, but the
   > original author said he wanted to work on it some more
   > before including it. And that's the last I've heard on
   > the topic.

Last John Porter and I discussed this, he was interested in improving
the code before contributing it, but then started looking into VTK
solutions and may not be working on this anymore.

Once, long ago now, I thought about attempting to make MPL fundamentally 3D. (Now, however, I probably couldn't even find the design document I started drafting if I tried.) But it seems to me that there are 2 ways we should consider to get MPL to do 3D.

First is John Porter's idea - a "cheap trick" to transform all 3D primitives into 2D line segments and polygons. (Actually, although I regard it as a cheap trick, I was really impressed to see it and I can see its usefulness. And despite my billing as "cheap", this approach is somewhat computationally expensive and a major practical drawback is going to be the refresh rate while doing interactive panning, zooming, and rotations.) This would require no change to the current backends and my vote is that we stick it in ASAP.

The second idea is to re-write the MPL core to be 3D-aware using the standard 4x4 homogeneous coordinate transform matrices used by OpenGL. We could pipe 3D data directly into the 3D backends (of which there are currently exactly zero, but they would come...) and we would use software projection to render 3D coordinates into 2D coordinates for the 2D backends (which would stay mostly the same). All of the current 2D plotting functionality would represent the z=0 case of 3D, and we could presumably make most of this work happen under the covers.

Unfortunately, implementing this second idea represents ripping out the core of MPL and replacing it with a new one. And, fundamentally, I'm not sure the pain would be worth it. We'll never have a 3D library as good as VTK, and the "cheap trick" method probably works well enough for 90-95% of other use cases. So whether or not John Porter donates his code to us, it would be _very_ useful to have something like that...

Now, mostly jokingly, how 'bout a MPL-like VTK interface?? Somehow the idea of "borrowing" the MPL interface has playful allure, no? :wink:

Andrew Straw wrote:

Now, mostly jokingly, how 'bout a MPL-like VTK interface?? Somehow the
idea of "borrowing" the MPL interface has playful allure, no? :wink:

*Which* MPL interface? The OO API or the pylab API? Does Prabhu's work with tvtk
strike any chords? E.g.

http://svn.enthought.com/svn/enthought/trunk/src/lib/enthought/tvtk/tools/mlab.py

···

--
Robert Kern
robert.kern@...149...

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
  -- Richard Harter

Also have a look at the screenshot at
  http://www.enthought.com/enthought/wiki/TVTK
(and http://www.enthought.com/enthought/wiki/MayaVi)

IMHO: before starting to think about how to
incorporate 3D in MPL one should spend some time with the
excellent tvtk and MayaVi2 (which is in very good shape already).

In case someone wants to try out tvtk and MayaVi2,
  http://www.scipy.org/ArndBaecker/MayaVi2
might be helpful.

Best, Arnd

···

On Tue, 31 Jan 2006, Robert Kern wrote:

Andrew Straw wrote:

> Now, mostly jokingly, how 'bout a MPL-like VTK interface?? Somehow the
> idea of "borrowing" the MPL interface has playful allure, no? :wink:

*Which* MPL interface? The OO API or the pylab API? Does Prabhu's work with tvtk
strike any chords? E.g.

http://svn.enthought.com/svn/enthought/trunk/src/lib/enthought/tvtk/tools/mlab.py