On 12/17/2023 11:22 PM, Gavin via ntg-context wrote:

1. How do I avoid redrawing diagrams with every typeset? The globe above takes 
about 0.7s, which is not bad, but it adds up in a book with many diagrams.

\startbuffer[demo]
\usemodule [luageo]
\startMPpage
    GlobeDiameter = 10cm ;
fill fullcircle scaled GlobeDiameter withcolor .9white ; % Fill a circle with the water color. drawglobe(23, 0) scaled GlobeDiameter withcolor .75white ;% Draw the land. draw fullcircle scaled GlobeDiameter withcolor black ; % Add a border, if you want.
\stopMPpage
\stopbuffer

\typesetbuffer[demo]

2. How do I organize this according to TDS for sharing? I know what TDS is and 
why it’s important, but that’s about it!

Hraban will guide you here.

3. Should I be creating a namespace for this module, or launching a separate 
MetaFun instance? I have a general sense of what “namespace” and “instance” 
mean is this context, but I don’t know the consequences or the how-to.
If the code is robust there is no need for an instance.

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to