ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A Metafun-Problem
@ 2021-04-12 21:06 Willi Egger
  2021-04-12 21:22 ` Jairo A. del Rio
  0 siblings, 1 reply; 5+ messages in thread
From: Willi Egger @ 2021-04-12 21:06 UTC (permalink / raw)
  To: NTG-Context ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 157 bytes --]

Hi

can somebody tell me why I do not get a trapezoid with bottom angles of 120 degrees?

Please try the attached minimal example.

Thank you!

Willi

[-- Attachment #1.2.1: Type: text/html, Size: 462 bytes --]

[-- Attachment #1.2.2: test.tex --]
[-- Type: application/octet-stream, Size: 833 bytes --]

% Context file
% Filename: test.tex
% Willi Egger
% 12-04-2021

\startuniqueMPgraphic{Hive}
	numeric b,d,u ;
	path p[], line[] ;
	pair Pkt[],destination[];

	u :=  0.1 mm ;	
	b :=  360u ;
	d :=  260u ;

	
	p[1] := unitsquare xscaled b yscaled d ;

	destination[1] := dir(-60) * 200u ;
	destination[2] := dir(-120) * 200u	;
	
	line[1] := llcorner p[1]--lrcorner p[1];

	line[2] := ulcorner p[1] -- destination[1] ;
	line[3] := urcorner p[1] -- destination[2] ;

	Pkt[1] := line[2] intersectionpoint line[1] ;
	Pkt[2] := line[3] intersectionpoint line[1] ;
	
	draw p[1] ;
	
	draw ulcorner p[1] -- Pkt[1] ;
	draw urcorner p[1] -- Pkt[2] ;
	draw destination[1] withpen pencircle scaled 3pt withcolor red;
	draw destination[2] withpen pencircle scaled 3pt withcolor green;
\stopuniqueMPgraphic

\starttext

	\useMPgraphic{Hive}

\stoptext

[-- Attachment #1.2.3: Type: text/html, Size: 235 bytes --]

[-- Attachment #1.2.4: test.pdf --]
[-- Type: application/pdf, Size: 4299 bytes --]

[-- Attachment #1.2.5: Type: text/html, Size: 217 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-13  6:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 21:06 A Metafun-Problem Willi Egger
2021-04-12 21:22 ` Jairo A. del Rio
2021-04-12 21:39   ` Willi Egger
2021-04-12 21:47   ` Willi Egger
2021-04-13  6:18     ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).