From: Benjamin R. <ben...@ou...> - 2013-10-11 18:16:54
|
On Tue, Oct 8, 2013 at 12:00 PM, jcskyhawk09 <jcs...@gm...> wrote: > Hi, > > I am trying to use matplotlib to create script files that I can use to > render 3D plots in blender. I have already created the code to create the > file itself. I am currently trying to find the best place to put my code > into. I have tried using top level methods like get_path(), however these > functions do not work because they return the data points after they have > been projected and to render in blender I need the raw data points. > > I have tried editing the axes3d file and was able to create a working file. > However, I am worried there will be too much code recreation at this level. > I have also attempted to edit the art3d file to try to have less code > generation. However, I was unable to find all of the data for the points. > Any help or ideas on where to put the code would be greatly appreciated. > > If anymore information is needed please let me know, this is my first post > so I apologize if I left something out. > > Thanks, > James > > > One of the main limitations that I see is that the top level code in mplot3d still needed to conform with the basic assumptions of matplotlib's rendering engine. That being a 2-D + z-ordering renderer. So, top-level functions like get_path() has to return a 2-D projected form of the internal 3-D data, and then a zorder value is provided to represent the 3rd dimension for all the data for that artist object. It is entirely possible to get at the internal data unmolested, but there is no unified mechanism for doing so. Sometimes the z-data is stored separately. Sometimes the data is stored as a Nx3 numpy array. What might be a useful endeavour is to first look to unify the 3d get/set methods of the art3d classes. Cheers! Ben Root |