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. However, if it's "pretty easy" to add Hershey Roman font
into Tachyon itself, this would be a wonderful and well-used addition.

- Robert


On Thu, Feb 10, 2011 at 8:22 PM, John Stone <[email protected]> wrote:
> I've pondered adding text rendering as a built-in feature of Tachyon,
> but up to this point I have resisted due to the complexity involved.
> (whatever font set I would choose would undoubtably not be exactly the
> right thing for any particular usage).  The best way to do this is
> usually to build the font code into the calling application, as it can
> be used with multiple renderers and the rendered images can be made to
> look exactly the same whether OpenGL, Tachyon, Renderman, POV-Ray,
> etc.  This is what I've done in VMD, the molecular visualization tool
> I develop in my day job.  In VMD, I use one of the public domain
> Hershey vector font sets, with two simple APIs, one generates OpenGL
> rendering commands, and the other is setup to be called to generate
> the vector font strokes on-the-fly by any rendering API one would
> want.  Using this scheme, VMD generates line-based renderings within
> OpenGL, and uses sequences of connected cylinders and spheres in ray
> tracers or other renderers that don't have an exact equivalent of a
> "line".  Here are relevant VMD source files as examples:
> Hershey.h:
>  http://www.ks.uiuc.edu/Research/vmd/doxygen/Hershey_8h-source.html
> Hershey.C:
>  http://www.ks.uiuc.edu/Research/vmd/doxygen/Hershey_8C-source.html
>
> TachyonDisplayDevice.C (see the ::text method therein):
>  http://www.ks.uiuc.edu/Research/vmd/doxygen/TachyonDisplayDevice_8C-source.html#l00153
>
> I could add the Hershey Roman font I use in VMD into Tachyon pretty
> easily, but it might be an even better idea to build this into SAGE
> itself.  What do others think?
>
> Cheers,
>  John Stone
>  [email protected]
>
> On Feb 6, 3:11 am, Robert Bradshaw <[email protected]>
> wrote:
>> IIRC, the ability to easily do text labels is something that is
>> missing right now. It would be great to be able to attach some text to
>> a point (we don't need shadows or anything fancy). We could probably
>> even do this ourselves if there was an easy API to go from 3D point to
>> 2D point in the output.
>>
>> - Robert
>>
>> On Sat, Feb 5, 2011 at 10:40 PM, William Stein <[email protected]> wrote:
>> > Hi,
>>
>> > I have permission from the author of Tachyon to forward his message
>> > below to the Sage list.  He's basically interested in whether there is
>> > _anything_ he could do to make Tachyon more useful for Sage.  See
>> > below.
>>
>> > ---------- Forwarded message ----------
>> > From: John Stone <[email protected]>
>> > Date: Tue, Feb 1, 2011 at 10:56 PM
>> > Subject: Feedback on Tachyon APIs used by SAGE, etc..
>> > To: William Stein <[email protected]>
>>
>> > Hi William,
>> >  I'm in the process of doing a bunch of updating of the
>> > Tachyon header files and documentation and thought I'd send a
>> > quick ping.  I was wondering if the SAGE project wants or needs
>> > anything changed or improved in the Tachyon APIs, since I'm already
>> > doing some significant improvements for other projects.
>>
>> > I was also curious what portions of the Tachyon APIs are
>> > exposed in SAGE now, and whether it might be time to
>> > update SAGE to be able to take advantage of various new
>> > Tachyon features such as ambient occlusion lighting and
>> > other improvements that may not be exposed in the
>> > current versions SAGE.
>>
>> > I would also be happy to have a look at your existing
>> > Tachyon code and see if I notice anything that might be added
>> > or improved if you can tell me where to look for it.
>>
>> > Cheers,
>> >  John Stone
>>
>> > --
>> > NIH Resource for Macromolecular Modeling and Bioinformatics
>> > Beckman Institute for Advanced Science and Technology
>> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
>> > Email: [email protected]                 Phone: 217-244-3349
>> >  WWW:http://www.ks.uiuc.edu/~johns/     Fax: 217-244-6078
>>
>> > --
>> > William Stein
>> > Professor of Mathematics
>> > University of Washington
>> >http://wstein.org
>>
>> > --
>> > To post to this group, send an email to [email protected]
>> > To unsubscribe from this group, send an email to 
>> > [email protected]
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/sage-devel
>> > URL:http://www.sagemath.org
>
> --
> To post to this group, send an email to [email protected]
> To unsubscribe from this group, send an email to 
> [email protected]
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to