From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95007 Path: news.gmane.org!not-for-mail From: DesdeChaves Newsgroups: gmane.comp.tex.context Subject: Re: Buffered metapost function freezes random numbers Date: Wed, 25 May 2016 18:44:52 +0100 Message-ID: References: <5745E14C.9000700@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6457818585603381513==" X-Trace: ger.gmane.org 1464198328 17452 80.91.229.3 (25 May 2016 17:45:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 May 2016 17:45:28 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 25 19:45:15 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b5crr-0001ZM-Mm for gctc-ntg-context-518@m.gmane.org; Wed, 25 May 2016 19:45:15 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D17B2E049; Wed, 25 May 2016 19:45:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L5QjEgSZPeZW; Wed, 25 May 2016 19:45:06 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 2B8EEE04E; Wed, 25 May 2016 19:45:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A0352E049 for ; Wed, 25 May 2016 19:45:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lpRkLwwcLand for ; Wed, 25 May 2016 19:45:04 +0200 (CEST) Original-Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 4CE57E03C for ; Wed, 25 May 2016 19:44:54 +0200 (CEST) Original-Received: by mail-it0-f51.google.com with SMTP id l63so36636527ita.1 for ; Wed, 25 May 2016 10:44:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=LRP/VrHYButswlvNey+6hrStwB1thhGvqg8VTV9pe18=; b=dGGXOovCaVTnWamigkNnrNJUtKK3KjoTEA3nHyaTZXyVUYtGecJVZP8s1megucHNgW Yw9QCWHpMqAaZAnt9xFrYHwlFPTF6fB+jUP3NG2yvAcMN2pyIkwAkTwk6scpHwDfxnhu dV/3rIUQuCO8jHZnoKE+VlC7xdk3/ds1Po6tWyfEokDY6h9v3Wl644JHi6QEM0i5/cI4 kY2lnTNWge+2VMVDO/9Lfww823TPGD7mKr3Z8aYq+VV5sDgtjaUqIEsghdz5yXaT4qK4 TL8qGWX2WEAm8r5i6snMlV+UIROEJ5W/bnktD2+6USSTP77esdDGxyzE3HVyOqE7LyAt PNcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=LRP/VrHYButswlvNey+6hrStwB1thhGvqg8VTV9pe18=; b=B3Ia3XnR1K0Kr82Iy82LKrtQaUtwCdXKKIR+Tgv8UVANhxIMLstTt88XoFriWZfXM2 QrQ+NGLQvIbGtRGYPBWBB/E9QVPDGeE7BMG+gLEBW4cH2IVsGgmw1h4mYL7w714UtBFp cBzStLQO2aRo05/99T61g2dcEa2agkX6vydBpxDc9IRdfJUGJe4iEjAzSJGaN4pSlUmP W+82NhhfB2Rg3noM6nng6XgPqBxXVfuXtskYgPgLtzs/AsUTEZWeim8HNrupIiWtqEqd THJwJblKnd28E0EaXeLHhMabJs87ArB9KN7HUg42n52WUcyM5GAkGTQkFMF5JnzfwxBT TcNg== X-Gm-Message-State: ALyK8tIBx+zvUtHptdTQ15tncrf2LRBz3YcXsTOfhbdsx4cGXbRO0Bspi4nKh2A5GgkdUdDdt7fu4Yef9tdpDA== X-Received: by 10.36.11.84 with SMTP id 81mr4907123itd.89.1464198292787; Wed, 25 May 2016 10:44:52 -0700 (PDT) Original-Received: by 10.79.111.207 with HTTP; Wed, 25 May 2016 10:44:52 -0700 (PDT) In-Reply-To: <5745E14C.9000700@gmail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:95007 Archived-At: --===============6457818585603381513== Content-Type: multipart/alternative; boundary=001a1140c3381f5c8d0533ae3b25 --001a1140c3381f5c8d0533ae3b25 Content-Type: text/plain; charset=UTF-8 I found this solution in a old Hans post ( http://ntg-context.ntg.narkive.com/g0lT1D2A/scaling-mpgraphics) 2016-05-25 18:30 GMT+01:00 Wolfgang Schuster : > DesdeChaves > 25. Mai 2016 um 19:09 > For educational purposes I try to simulate a ammeter for reading practice. > I would like create six or more ammeter with different readings, but i'm > not able to do that because metapost create the same random number every > time I call the buffer that defines my ammeter. > > How can I fix that? > > Is there a reason why you use \externalfigure because the width can be set > with \scale, e.g. > > \scale[width=8cm]{\getbuffer[ammeter]} > > Wolfgang > > > ___________________________________________________________________________________ > 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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ > -- Atentamente DesdeChaves --001a1140c3381f5c8d0533ae3b25 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I found this solution in a old Hans post =C2=A0(http://ntg= -context.ntg.narkive.com/g0lT1D2A/scaling-mpgraphics)

2016-05-25 18:30 GMT+01:00 = Wolfgang Schuster <schuster.wolfgang@gmail.com>:
25.=20 Mai 2016 um 19:09
For educational=20 purposes I try to simulate a ammeter for reading practice.
I would like create six or more ammeter with different=20 readings, but i'm not able to do that because metapost create the same= =20 random number every time I call the buffer that defines my ammeter.

How can I fix that?
Is there a reason why you use \externalfigure because the width can be=20 set with \scale, e.g.

=C2=A0=C2=A0=C2=A0 \scale[width=3D8cm]{\getbuffer[ammeter]}

Wolfgang

_______________________________________________________________________= ____________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" rel=3D"noreferrer= " target=3D"_blank">http://www.ntg.nl/mailman/listinfo/ntg-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://tex.aanhet.net
archive=C2=A0 : http://foundry.supelec.fr/projects/con= textrev/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________



--
=
Atentamente

DesdeChaves
--001a1140c3381f5c8d0533ae3b25-- --===============6457818585603381513== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============6457818585603381513==--