ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger <context@boede.nl>
To: NTG-Context ConTeXt users <ntg-context@ntg.nl>
Subject: Re: A Metafun-Problem
Date: Mon, 12 Apr 2021 23:47:26 +0200	[thread overview]
Message-ID: <9DCBF148-DA7B-4B4E-AA72-9818788856B0@boede.nl> (raw)
In-Reply-To: <CAKyqqaYP03JrsxM=z56HMYya0UXDb6qo6zt47SMO9=qUYDfJYQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

Hi,

Ok, changing the unitsquare into fullsquare is giving a better result, however it is still not the right drawing. I realise, that in this case probably the use of a vector in this way is not appropriate. — I have changed the drawing into something with rotating the top-line of the rectangle around the corner. If I am correct, then this is the right drawing.

Thank you again for your answer, it made me see the culprit correctly!

Kind regards

Willi

[-- Attachment #2: test.tex --]
[-- Type: application/octet-stream, Size: 1150 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] := fullsquare 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] ;
	
	line[10] := (ulcorner p[1]--urcorner p[1]) rotatedaround(ulcorner p[1],-60) ;
	line[11] := (urcorner p[1]--ulcorner p[1]) rotatedaround(urcorner p[1],60) ;
	
	Pkt[1] := line[2] intersectionpoint line[1] ;
	Pkt[2] := line[3] intersectionpoint line[1] ;
	
	draw p[1] ;
	
	draw ulcorner p[1] -- Pkt[1] withcolor yellow;
	draw urcorner p[1] -- Pkt[2] withcolor yellow;
	draw destination[1] withpen pencircle scaled 3pt withcolor red;
	draw destination[2] withpen pencircle scaled 3pt withcolor green;
	
	draw  line[10] withcolor blue ;
	draw line[11] withcolor blue ;
	draw origin withpen pencircle scaled 3pt withcolor blue;
\stopuniqueMPgraphic

\starttext

	\useMPgraphic{Hive}

\stoptext

[-- Attachment #3: test.pdf --]
[-- Type: application/pdf, Size: 4337 bytes --]

[-- Attachment #4: Type: text/plain, Size: 1480 bytes --]



> On 12 Apr 2021, at 23:22, Jairo A. del Rio <jairoadelrio6@gmail.com> wrote:
> 
> Is this what you need? If so, change unitsquare by fullsquare.
> 
> Jairo
> 
> El lun, 12 de abr. de 2021 a la(s) 16:06, Willi Egger (context@boede.nl) escribió:
> 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
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> <test.pdf>___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


[-- Attachment #5: 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
___________________________________________________________________________________

  parent reply	other threads:[~2021-04-12 21:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 21:06 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 [this message]
2021-04-13  6:18     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9DCBF148-DA7B-4B4E-AA72-9818788856B0@boede.nl \
    --to=context@boede.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).