[NTG-context] Metafun: how to draw a straight line past the end points
Aditya Mahajan
adityam at umich.edu
Wed Dec 9 18:37:24 CET 2020
On Wed, 9 Dec 2020, Otared Kavian wrote:
> Thanks a lot ! Indeed that does the job, which shows how wonderful Metafun is !
Or, if you want to use high school algebra:
\starttext
\startMPcode
z1 = (1cm,3cm) ;
z2 = (5cm, 9cm) ;
z3 = 1cm * dir(angle (z2 - z1)) shifted z2;
draw z1 -- z3 ;
draw z1 -- z2 withcolor red;
\stopMPcode
\stoptext
Aditya
More information about the ntg-context
mailing list