Hello ConTeXers,
I wrote a little module, Luageo, for drawing globes in LMTX. (Some of you may
remember me asking questions about it over the past few years.) I finally
packaged it and published on contextgarden.net, following the excellent
instructions on the wiki.
The module provides a single MetaPost macro:
globe( , )
The two arguments are the latitude and longitude of the center location. The
macro returns a single MetaPost path consisting of all visible country and
island boundaries. This path can be drawn or filled to produce a globe. Details
and examples are in the four page manual included with the module.
Luageo is a small module, containing only a few hundred lines of code (in
addition to the data files). Most of the code is written in Lua, with some help
from MetaPost and ConTeXt. If you are interested in integrating Lua and
MetaPost for graphics in ConTeXt, Luageo might be an interesting example for
you. The module is public on GitHub.
https://github.com/Sophias-Compass/Luageo
There are several obvious opportunities for improving Luageo:
- More \ConTeXt-like behavior. For example, adding a key=value
interface.
- More globe views and map projections.
- Better map data, e.g. Natural Earth (www.naturalearthdata.com)
You can also find some of my other projects on GitHub. I created Luageo to help
with diagrams for a physics textbook. (An example from the textbook is
attached.) Eventually, I hope to write other modules related to the textbook
project.
I would love to have more collaborators. You don't have to know any physics!
Gavin
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________