John Hunter wrote: >>> Do we want to use 3x3 or 4x4 to leave the door open for 3D developers? >> 4X4 -- is there much cost? > > The potential cost is not in the 3x3 vs 4x4, but in the extra row of > junk data you would store in the data matrix, which is N extra values > for plotting N points . The matrix multiplication would be 3x3 * 3xN > vs 4x4 * 4xN , so there would be a cost in memory and performance.
I'm not sure this is the case -- there are still going to have to be transforms which aren't 4x4 projections (e.g. polar transforms), so presumably we keep the 2D affine transform as another case, just the one that gets used 99% of the time. Perhaps it could even subclass the 4x4 projection transform but optimize needing 4D data on backends where this is an optimization (all the 2D ones) and keep the 3rd and 4th dimensions when sending to OpenGL or whereever. Or am I missing something? My biggest mental stumbling block (which is IIUC is already solved for mpl0, so it is really just my stumbling block) doing placements like "OK, here are 10 million data points which need to go through this polar transform, but also, plot this text such that the anchor is 2 pixels above the 439th point." mpl can clearly do this by keeping a copy of the transform before it pushes it off to the backend, but this gets tricker when you need reference coordinates that only the backend can compute, such as relative to rendered strings. Perhaps an explicit multipass system is necessary? (This whole kettle of fish is actually the part of mpl that I currently don't understand at all, so I'm probably mischaracterizing the situation.) Anyhow this is exciting, and I wish I had more time to jump in and help code... ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel