[NTG-context] About macro numberstriped ()

Floris van Manen vm at klankschap.nl
Sun Oct 2 11:20:52 CEST 2022



On 02/10/2022 10:55, Fabrice Couvreur via ntg-context wrote:
> Initially, there was a bug with maro numberstriped() and Hans suggested 
> another sensible approach to me, but you don't get the same shape of the 
> hatches depending on the dimensions of the squares.

some unexpected side effect show up when the unitsquare is xyscaled to a 
rectangle like (2.5cm,1cm)
it seems related to the angle chosen

e.g.



\startMPcode

path p, q, r, b ;
p  := unitsquare xyscaled (4cm,4cm) ;
q := unitsquare xyscaled (1cm,1cm) shifted(0,3cm) ;
r := unitsquare xyscaled (2.5cm,1cm) shifted(1cm,3cm) ;
b := unitsquare xyscaled (3cm,3cm) shifted(1cm,0) ;

draw r anglestriped (1,35,2) withcolor red;
draw q anglestriped (1,35,2) withcolor green;
draw b anglestriped (1,35,2) withcolor cyan;
draw p;
draw q;
draw b;
draw r;

label.llft("D", p) ;
label.lrt("C", p) ;
label.ulft("A", p) ;
label.urt("B", p) ;
label.urt("P", lrcorner r) ;
label.lft("Q", llcorner r) ;
label.top("M", urcorner r) ;

\stopMPcode
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2022-10-02 11-15-45.png
Type: image/png
Size: 48177 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20221002/c6583128/attachment-0001.png>


More information about the ntg-context mailing list