[x3d-public] Mayavi

Frederic Vogt frederic.vogt at alumni.anu.edu.au
Fri Aug 30 13:31:30 PDT 2019


Hi Don, 

Indeed, I have been keeping an eye out for all your ongoing activities on the Python front. Lurking from the shadows, it’s great to see this coming along. I can see that it will really be a key asset for facilitating the generation of models. 

When it comes to mayavi, I suspect that we would get the best use out of it if we could tie the x3d package directly to the “savefig” function of that module. Ideally, the user could then call the high-level functions of mayavi to plot complex 3D functions, shapes, etc … to create x3d content, without the need to worry about the intermediate layers of defining the detailed x3d nodes. 

In other words, we might be talking about a bypass of the VTK exporter inside mayavi - or a revamp of the VTK exporter to use the x3d package. But this of course should be looked at only once the x3d module reaches a reasonable level of maturity/stability.

Either way, I’ll be between jobs in the coming months, but would be happy (and should have some time) to start contributing towards assembling tests and examples for the x3d module based on real astro data. 

Cheers, 
Frédéric


> On Aug 29, 2019, at 01:20, Brutzman, Donald (Don) (CIV) <brutzman at nps.edu> wrote:
> 
> Yes really great work, we've been watching your steady progress for several years now!
> 
> Thank you Frederic for your continuing efforts, taking us from beyond towards infinity...  8)
> 
> ... and inward, I think Joe is right that these visualization techniques might well be adapted towards human medical-record usage as well.
> 
> Also thanks for refreshing our knowledge regarding
> 
> 	The X3D Pathway: Interactive HTML with Python and X3D: a red dice example
> 	http://fpavogt.github.io/x3d-pathway/dices.html
> 
> You are likely aware of our long-running efforts to build a Python language binding for X3D.  We have had great recent progress... am downhauling your 1GB example archive.  Am thinking that we might be ready in about a month or so to compare whether the new approach can catch up to what you showed in 2015.  Perhaps we might even collaboratively create a jupyter notebook for that reconstruction!
> 
> 	Python X3D Package x3d.py
> 	https://www.web3d.org/x3d/stylesheets/python/python.html
> 
> ... I extracted your green_dice example, please find attached an X3dToJson.xslt conversion green_dice_translated.py for comparison.
> 
> 
> On 8/28/2019 5:17 AM, Joseph D Williams wrote:
>> http://fpavogt.github.io/x3d-pathway/HCG.html
>> 
>> Hi Fredrick,
>> 
>> The result Is really nice.
>> 
>> This must have something to do with medical visualization.
>> 
>> Thanks,
>> 
>> Joe
>> 
>> *From: *Frederic Vogt <mailto:frederic.vogt at alumni.anu.edu.au>
>> *Sent: *Monday, August 26, 2019 12:27 PM
>> *To: *X3D-Public <mailto:x3d-public at web3d.org>
>> *Subject: *Re: [x3d-public] Mayavi
>> 
>> Hi Don,
>> 
>> I’ve been using Mayavi for a few years to create my X3D models. As far as I understand them, the X3D export functionalities of Mayavi are actually those from the VTK X3D exporter, which it wraps around. These have (had ?) a series of annoying limitations which made the process of creating X3D models that way a bit too “manual” for my taste … However, the easy of use of this tool, which is very reminiscent of matplotlib, was more than enough to outweigh its disadvantages (in my opinion).
>> 
>> If anyone is interested, the following pages (and associated Github repository) describe my experiments using mayavi to create X3D models for astrophysics (including their publications in scientific journals): http://fpavogt.github.io/x3d-pathway/
>> 
>> This page in particular describes the different problems I encountered with mayavi, and my (not always efficient) work-arounds: http://fpavogt.github.io/x3d-pathway/dices.html
>> 
>> I do not know if the latest updates fix some of the issues described in there … I’ll need to check when I get some time. Mainly, it has to do with the fact that the exporter fails (failed ?) to deal properly with a series of items that Mayavi can create, including axes labels, etc …
>> 
>> Cheers,
>> 
>> Frédéric
>> 
>> 
>> 
>>    On Aug 26, 2019, at 15:00, <x3d-public-request at web3d.org <mailto:x3d-public-request at web3d.org>> <x3d-public-request at web3d.org <mailto:x3d-public-request at web3d.org>> wrote:
>> 
>> 
>>    Today's Topics:
>> 
>>       1. Mayavi (Python 3D Data Visualization and Plotting Library)
>>          adds major new features in recent release - Enthought Blog
>>          (Brutzman, Donald (Don) (CIV))
>> 
>> 
>>    ----------------------------------------------------------------------
>> 
>>    Message: 1
>>    Date: Mon, 26 Aug 2019 06:21:34 +0000
>>    From: "Brutzman, Donald (Don) (CIV)" <brutzman at nps.edu <mailto:brutzman at nps.edu>>
>>    To: X3D Graphics public mailing list <x3d-public at web3d.org <mailto:x3d-public at web3d.org>>
>>    Subject: [x3d-public] Mayavi (Python 3D Data Visualization and
>>    Plotting Library) adds major new features in recent release -
>>    Enthought Blog
>>    Message-ID: <40d6118c-736f-1b68-ecca-6d037dcd9d86 at nps.edu <mailto:40d6118c-736f-1b68-ecca-6d037dcd9d86 at nps.edu>>
>>    Content-Type: text/plain; charset="utf-8"
>> 
>>    "Mayavi (Python 3D Data Visualization and Plotting Library) adds major new features in recent release"
>> 
>>    "Key updates include: Jupyter notebook integration, movie recording capabilities, time series animation, updated VTK compatibility, and Python 3 support"
>> 
>>    by Prabhu Ramachandran, core developer of Mayavi and director, Enthought India
>> 
>>    * Jupyter notebook support: Adds basic support for displaying Mayavi images or interactive X3D scenes
>> 
>>    http://blog.enthought.com/general/mayavi-python-3d-data-visualization-and-plotting-library-adds-major-new-features-in-recent-release/
>> 
>>    ======= also ===========
>> 
>>    Scipy lecture notes ? 3. Packages and applications ?
>>    3.5. 3D plotting with Mayavi
>>    https://scipy-lectures.org/packages/3d_plotting
>>    Author: Ga?l Varoquaux
>> 
>>    "Mayavi is an interactive 3D plotting package. matplotlib can also do simple 3D plotting, but Mayavi relies on a more powerful engine ( VTK ) and is more suited to displaying large or complex data."
>> 
>>    ========================
>> 
>>    This is very interesting use of Python and holds multiple aspects in common with our work on Python X3D.   Cool viz, Jupyter Notebook, etc. Wondering if anyone is familiar with their tool, approach or company?
>> 
>>    all the best, Don
>>    -- 
>>    Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
>>    Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
>>    X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
>> 
>> 
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>> 
> 
> 
> all the best, Don
> -- 
> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
> <green_dice.png><green_dice.py><green_dice.x3d><green_dice_translated.py>



More information about the x3d-public mailing list