From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Draw a line with Metafun
Date: Mon, 08 Aug 2005 14:03:37 +0200 [thread overview]
Message-ID: <42F74A19.7040209@wxs.nl> (raw)
In-Reply-To: <OF80B57915.A8E2C976-ONC1257057.0034D2C4@vit.de>
Jessica Holle wrote:
>Hi,
>
>I want to draw a line myself with Metafun.
>This line should looks like in the module pre-05.
>
>I've copied a few lines and try to understand what there happend.
>But it failed. I've also read in the metafun.pdf, but it ist very
>hard to understand.
>
>I don't see the context between the numbers of x ond y. When I
>change the numbers the output varies but in no relation to the
>numbers.
>
>Can anyone help to explain this to me or has another documentation?
>
>so looks my test:
>
>\setupoutput[pdftex]
>\setupcolors[state=start]
>\definecolor[back2][r=.6,g=.7,b=.8]
>\definecolor[back][s=.95]
>\starttext
>\startMPinclusions
>def random_hash_frame (expr width, height, offset, linewidth ) =
>def delta = ((uniformdeviate .5offset) + .25offset) enddef ;
>x1 := 0.5cm ; y1 :=0.5cm ; x2 := 16cm ; y2 := 3cm ;
>drawoptions(withpen pencircle scaled linewidth withcolor
>\MPcolor{back2}) ;
>fill z1--(x2,y1)--z2--(x1,y2)--cycle ;
>enddef;
>\stopMPinclusions
>\startuseMPgraphic{jessi}
>random_hash_frame(height,width, 0.5cm,0.5cm)
>
>
10cm,5cm
or whatever, you need to provide some known measures
>\stopuseMPgraphic
>\useMPgraphic{jessi}
>\stoptext
>
>
think of z1 being equivalent to (x1,y1)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
prev parent reply other threads:[~2005-08-08 12:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-08 9:43 Jessica Holle
2005-08-08 12:03 ` Hans Hagen [this message]
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=42F74A19.7040209@wxs.nl \
--to=pragma@wxs.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).