On Tue, Oct 06, 2009 at 01:42:54PM +0200, Mark S. Bentley wrote: > I am a relatively new user of Gwyddion - finding it great so far! I am > currently preparing a presentation of some recent data, and would like > to produce an animation of the 3D output - a simple rotation of the 3D > window about a single axis, for example. > > Is it possible to use Pygwy, for example, to output a series of .png > files, incrementing the viewing angle by a degree or so each time?
In principle, it is possible. But it is not easy. At this moment, the 3D functions are more or less unavailable in the Python interface because of the historical naming that would require the Python identifiers to start with `3'. Since that's impossible all 3D functions require renamed wrappers but this has not been done. So using pygwy for the rendering requires extension of the Python interface. Doing it in C is relatively staightforward: After setting up the 3D view, change the Gwy3DSetup parameters and use gwy_3d_view_get_pixbuf() to get the rendered image. The only trouble is that you need to wait until the 3D scene is actually rendered on-screen (you would have the same problem in Python, of course). But if you do not insist on a clean solution simply waiting `long enough' should work. I have done similar things using PoV-Ray in the past though this was a long time ago. For this you might find useful the export of data to 16bit grayscale images (PNG, TIFF, PNM) that can be used as heighfields. This function is available in the development snapshots, it will appear in 2.18. Regards, Yeti ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Gwyddion-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gwyddion-users
