[GiNaC-devel] AsyForGiNaC - an output extension producing Asymptote files

Jens Vollinga vollinga at physik.uni-wuppertal.de
Fri Aug 18 14:49:16 CEST 2006


Dear Vladimir,

Vladimir Kisil schrieb:
>     JV> From the examples you gave, like tan(x) or cycles, it seems to
>     JV> me that only a new print context is needed.
> 
> 	I am in favour of printing context with seamless infrastructure for
>   further extensions by users/developers, (eg virtual methods?).

the seamless infrastructure is already there (cf. chapter 6.3 of the
manual). The only exception being GiNaC functions at the moment. This
could be remedied with the new function classes I am currently 
experimenting with.

>     JV> whether there should be just another print context or in
>     JV> addition to that several new methods to class basic.
> 
> 	Eg it may be a kind of route implemented in power(): the printing context
>   first checks are there any specific drawing methods defined for the
>   given class/defined scene combination and if not---fall back to the
>   default procedure. 

See 6.3 again. It's already there, as long as it is only about printing 
Asymptote commands.

I have still the impression that different things get mixed-up somehow:

GiNaC will _never_ ever DRAW things (unless we link it against OpenGL or 
something similar ...). And since it doesn't draw anything there is no 
need for drawing methods.

It is a nice idea to have GiNaC produce drawing commands for systems 
like Asymptote, though. But this is simply PRINTing text in Asymptote 
syntax, exactly like PRINTing in C or LaTeX syntax. The only thing 
needed therefore is - at least to me, correct me if I am wrong - a new 
printing context. New PRINT methods have to be added to GiNaC that have 
decent defaults. In case the user wants something more special he can 
use the technique explained in Ch.6.3.

If this is correct, then it's okay with me to add such a possibility to 
GiNaC. Is it correct?

Then I have some light concerns about a continuous maintenance of that 
additional code (we had a similar issue with printing in python format 
in the past IIRC), but I guess it is something we just have to try. I 
thought about myself adding some stuff somewhere and then having to 
worry not just about plain text or LaTeX printing, which I think I can 
handle, but also about some unfamiliar system (Asymptote) with lots of 
complexity for which I don't like to invest much time in learning in the 
near future. Somebody will have to take care of that, continuously.

Regards,
Jens




More information about the GiNaC-devel mailing list