Vyatcheslav Yatskovsky wrote:
I usually tackle this sort of thing by first drawing the entire image
in metapost code alone. Then, when that works, write a tex command
that fills in bits and pieces of the metapost image.
I understand your idea. Indeed, MP code draws underlying grid. How to
overlay circles on it using TeX? Please, an example.
First, create a metapost macro to draw a dot on a bar using two
arguments. Let's assume this is "mark(a,b)". I won't write that
metapost macro for you, you have to do that yourself.
\startuseMPgraphic{chordgrid}{e,B,G,D,A,E}
drawoptions(withpen pencircle scaled 0.4pt withcolor black) ;
draw hlingrid(0, 5, 1, 0.8cm, 1cm) ;
draw vlingrid(0, 4, 1, 1cm, 0.8cm) ;
draw mark(1,\MPvar{e});
draw mark(2,\MPvar{B});
draw mark(3,\MPvar{G});
draw mark(4,\MPvar{D});
draw mark(5,\MPvar{A});
draw mark(6,\MPvar{E});
\stopuseMPgraphic
\define[6]\Ch
{\dontleavehmode
\useMPgraphic{chordgrid}{e={#1},B={#2},G={#3},D={#4},A={#5},E={#6}}}%
\hskip2mm}
Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________