Mikael Sundqvist schrieb am 01.12.2024 um 14:02:
Hi

On Sun, Dec 1, 2024 at 1:28 PM Wolfgang Schuster
<wolfgang.schuster.li...@gmail.com> wrote:
Hans Hagen via ntg-context schrieb am 01.12.2024 um 12:34:
On 12/1/2024 11:54 AM, Bruce Horrocks wrote:

<sigh> Sorry, brain not in gear
so once you're rebooted, you can figure out the logic behind this:

linecap := butt ;
linejoin := beveled ;
This doesn't result in the desired output I want.
or even

pickup pensquare rotated -60 scaled (1/sqrt(2)) ;
linecap := 1 ;
I played with custom pens but failed to create a working triangle pen.
I'll take another look into it because a few custom pens can draw all lines.
\startuseMPgraphic{draw}
draw hlingrid(0, 7, 1, 7, 7) withpen pencircle scaled 1/20 shifted
(0.5,0.5) withcolor "darkgray" ;
draw vlingrid(0, 7, 1, 7, 7) withpen pencircle scaled 1/20 shifted
(0.5,0.5) withcolor "darkgray" ;
pen pentriangle ;
pentriangle := (makepen ((0,0) -- (1,0) -- (1,1) -- cycle) shifted
(-1/2,-1/2)) scaled 1 ;
drawoptions(withcolor "red");
pickup pensquare scaled 1;
draw (1,7) -- (7,7) ;
draw (7,1) ;
draw (5,4) ;
pickup pentriangle ;
draw (1,1) -- (2,1) withpen pentriangle rotated 90 ;
draw (3,1) -- (3,5) withpen pentriangle rotated 180 ;
draw (7,3) -- (5,3) withpen pentriangle rotated 90 ;
draw (7,5) -- (5,5) withpen pentriangle rotated 0 ;
\stopuseMPgraphic

seems to work here. But I happily admit it is a bit cumbersome...

It's a good starting point and I can work with it.

When I look at your pen setting it's possible I forgot the parentheses before the shift operation.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
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
___________________________________________________________________________________

Reply via email to