From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95006 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Buffered metapost function freezes random numbers Date: Wed, 25 May 2016 19:30:52 +0200 Message-ID: <5745E14C.9000700@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0688387895061181205==" X-Trace: ger.gmane.org 1464197569 4214 80.91.229.3 (25 May 2016 17:32:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 May 2016 17:32:49 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 25 19:32:35 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 1b5cfb-0004vV-1A for gctc-ntg-context-518@m.gmane.org; Wed, 25 May 2016 19:32:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 37A9BE18A; Wed, 25 May 2016 19:31:10 +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 NFmQ0ZXoMPVn; Wed, 25 May 2016 19:31:09 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 03A50E18C; Wed, 25 May 2016 19:31:09 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id CF866E18A for ; Wed, 25 May 2016 19:31:07 +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 wb0MmMxTTxTw for ; Wed, 25 May 2016 19:31:07 +0200 (CEST) Original-Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) (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 60472E189 for ; Wed, 25 May 2016 19:30:57 +0200 (CEST) Original-Received: by mail-wm0-f48.google.com with SMTP id a136so137604453wme.0 for ; Wed, 25 May 2016 10:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=1GRSwcCKKJC6OVtmp1W7AGOA2ObPqL3O4MbBqiI0Fjw=; b=gm2+aMfeLnTou7uOqEOn6zLnQ0wqzKGuKaOfb6NM2hLaflhbWqJHAPVO+N1h855nlG SK/6KWO6VKWr+T5wPUncn3x15D4t2PFXwKHSIRVPw6kS0W311c6uAgKOLNh+uS+y7MRf M/vVH6Uk9IV25GrRpaBMejMfc9UjSRU4jZ7b5MrG0Pe/uYWQQFVeRULDAmyFYr6tcDWX mAC69WM+EMwbeWO97ft7Bdj24AOLr21snYALrkxZ/5Y14/d/mfaBOB+QeuhiXmyd5tqs xKaipOUL8Df1SkVCg7bR34SjDZTLPe7jEJJkWh+vFYS3Nbj4uzajnSmNK4mAucBqUTMY ltvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=1GRSwcCKKJC6OVtmp1W7AGOA2ObPqL3O4MbBqiI0Fjw=; b=jHIsO2Zg/ccntuH7B94GEQE2Mt5+wt5l/zEqjoI1hoKQ660ODUuQ2spx3+jw4REXKv lfLDErnEJCHwsjRPljVZA4TorAreDYKRIhMT7EWNBb/PfeRVmPUcgSacq/o0c1q/6GON Ym2qFHDh4tJYNERj8sR6fwC5XC4fRGMdISpx4ZpTwS+KiezDq4y5SOzfnKJu53Ihvn2T 1hWSURCUYZ13cI+zBnWacGs6PNx89AUpFDI1ynvmUEP42TuagsxT0aszlSOYVI0d3o+c higd3ulx1FrY2EedTtS77ptnBsf+bdpeBXRjX5W0PyFEB0/RpYoj3pL6v8MIZx4us+WN 8Fpg== X-Gm-Message-State: ALyK8tKomHTSgzGBFbibabcSQiYsVcrHIOoM/eYiCtk6ES4LQvtfRRGt5oVxP2NwwrPCZg== X-Received: by 10.28.10.196 with SMTP id 187mr4914806wmk.76.1464197456638; Wed, 25 May 2016 10:30:56 -0700 (PDT) Original-Received: from keima.localdomain (x2f2df50.dyn.telefonica.de. [2.242.223.80]) by smtp.gmail.com with ESMTPSA id h14sm22524530wme.1.2016.05.25.10.30.55 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2016 10:30:55 -0700 (PDT) User-Agent: Postbox 4.0.8 (Macintosh/20151105) In-Reply-To: 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:95006 Archived-At: This is a multi-part message in MIME format. --===============0688387895061181205== Content-Type: multipart/alternative; boundary="------------080809040605020200010705" This is a multi-part message in MIME format. --------------080809040605020200010705 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > 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 --------------080809040605020200010705 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
25= .=20 Mai 2016 um 19:09
For educati= onal=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
--------------080809040605020200010705-- --===============0688387895061181205== 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= --===============0688387895061181205==--