[OS X TeX] circle using metapost
NMPOST7
nmpost7 at gmail.com
Sat Mar 23 12:23:33 EDT 2013
On 23/03/2013 17:10, Franck Pastor wrote:
> Not sure if it is exactly what you want, but it must be something like that…
For a circle of diametre d = 3cm and center c = (1cm, 2cm) :
>
> %unit
> u = 1cm ;
> % center c and diameter d
> pair c ; c = u*(1, 2) ;
> d = 3u;
> % the circle
> beginfig(1) ;
> draw fullcircle scaled d shifted c;
> endfig ;
> end.
>
> You can choose to turn it into a macro, of course:
>
> def do_my_circle(expr c, d) =
> draw fullcircle scaled d shifted c
> enddef ;
> u = 1cm ;
> beginfig(1) ;
> do_my_circle(u*(1, 2), 3u) ;
> endfig ;
> end.
Thank you, Franck.
That was an excellent help. You explained a whole concept with that one example.
BR
suren
More information about the MacOSX-TeX
mailing list