Hi, So it seems there are 3 ways to go presently which are all somewhat complementary: 1. Hershey font (probably the easiest for me to implement in the short term) 2. Have SAGE generate bitmaps containing text, which are either: a) applied to 3-D objects in Tachyon via texture mapping b) composited with the Tachyon output image, by computing the 3-D to 2-D point projection, and inserting the bitmap wherever it falls in the image generated by Tachyon, replacing the existing pixels
Regarding 2b): there isn't a 3-D to 2-D projection API currently. That's rather more similar to how a rasterizer (e.g. OpenGL) does things, sort of the inverse of how a ray tracer does it (generates a 3-D ray from a 2-D pixel location and does intersection tests to see what it "hit"). To add such an API I'd need to build in a bunch of new code to compute the projection matrix and compute the necessary transformation. The main drawback with this approach is that it won't work for any of the unusual camera models that don't assume planar/rectilinear image (e.g. fisheye, cylindrical, spherical, dome, etc). It could be made to work just fine for traditional orthographic and perspective projections however. If I implemented the full set of Hershey vector fonts in Tachyon, you would get a decent number of symbol glyphs, but you definitely wouldn't get the range of capabilities you've got now with generating bitmaps from latex. I can see that having one of the bitmap solutions would have high value and should be pursued regardless of the Hershey font feature. I think 1) and 2a) are not too hard to implement so we should try those first. Let me get back to you on this in a bit. Cheers, John On Fri, Feb 11, 2011 at 4:41 AM, Volker Braun <vbraun.n...@gmail.com> wrote: > On Friday, February 11, 2011 4:52:09 AM UTC, robertwb wrote: >> >> If there was a simple API to map from a 3D point to a 2D point the >> rendered output, then it would be much easier to superimpose text >> ourselves. > > +1 > More importantly, for scientific publications people will invariably want to > use greek letters, exponents, fractions, ... as axes labels. > The only alternative to superimposing labels after the raytracing step on > would be billboard-style labels; Sage has already support for rendering > latex into bitmaps, so we could feed them easily as textures to tachyon. > > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org