On 5/15/21 2:42 PM, Mikael Sundqvist wrote:
Hi,
you could do something like this:
\startMPpage
for i = 0 upto 10:
drawarrow if uniformdeviate(1)<0.5: reverse fi ((0,0)--(2cm,0)) yshifted i*cm;
endfor;
\stopMPpage
/Mikael
Hi Mikael,
wonderful, thanks for the quick answer! Yes that works
Hi,
you could do something like this:
\startMPpage
for i = 0 upto 10:
drawarrow if uniformdeviate(1)<0.5: reverse fi ((0,0)--(2cm,0)) yshifted i*cm;
endfor;
\stopMPpage
/Mikael
On Sat, May 15, 2021 at 2:30 PM Thomas A. Schmitz
wrote:
>
> Hi all,
>
> for a slide template, I want to draw
Hi all,
for a slide template, I want to draw colored arrows in a randomized
color (from a list of colors). This works (and the code is far too
clever for me, I must have copied it somewhere):
save mycolor ; color mycolor[] ;
mycolor[1] := (0.2, 0.3, 0.4) ;
mycolor[2] := (0.6, 0.6, 0.4) ;
Nice. I had something a little bit different in mind, but your examples
gave me some ideas, especially the shuffling stuff. If I have something new
to add, I will share my results with the list. Thank you a lot.
Best regards,
Jairo
El mié, 6 de ene. de 2021 a la(s) 03:56, Otared Kavian
Following up my previous message, here is an example:
%% begin shuffled list of exercises
\setuprandomize[2021]
\startluacode
function shuffle(tableau)
local maxsize, t, tt
maxsize = #tableau
tt = {}
t = {}
Hi Jairo,
One can indeed make quizzes and exams with randomized order of problems,
randomized values and even randomized names of functions and variables.
I have some examples which I have been using for several years (they are useful
especially in these days of giving exams online…): I can
Hi, list.
Some time ago I realized ConTeXt has "blocks" which allow one to make
quizzes, exams and related with ease. However, I want to know if there's an
option to randomize their order when printed. Thank you in advance.
Jairo
On 8/1/2016 12:47 PM, Mikael P. Sundqvist wrote:
Wow! That was fast! I just updated and it indeed works as expected.
I hate to ask another thing when I just got this fast and nice help,
but is there also a way to change the control points in such a way
that no _new_ sharp corners occur?
On Mon, Aug 1, 2016 at 10:12 AM, Hans Hagen wrote:
> On 8/1/2016 8:03 AM, Mikael P. Sundqvist wrote:
>>
>> Hi!
>>
>> I look for a way to randomize control points of a path, leaving the
>> coordinates themselves untouched.
>>
>> The reason is the following: I want to draw (for
On 8/1/2016 8:03 AM, Mikael P. Sundqvist wrote:
Hi!
I look for a way to randomize control points of a path, leaving the
coordinates themselves untouched.
The reason is the following: I want to draw (for example) a circle
with a triangle inside, and I want them to look slightly randomized.
If I
Hi!
I look for a way to randomize control points of a path, leaving the
coordinates themselves untouched.
The reason is the following: I want to draw (for example) a circle
with a triangle inside, and I want them to look slightly randomized.
If I do (see attached pdf for a typical result of
I know this and I have triggerd this by hand. So there is a lot of
time between. I have purged files between every run and I got the
same result if I wait 1 second, 1 minute or 1 day.
Well, then it probably qualifies as a bug, and, since the .tuc
file
has apparently been dismissed as
http://lua-users.org/lists/lua-l/2007-03/msg00564.html
Interesting, thanks for the research. So now we know you use a Mac :-)
Arthur
___
If your question is of interest to others as well, please add an
Am 08.04.10 09:41, schrieb Arthur Reutenauer:
http://lua-users.org/lists/lua-l/2007-03/msg00564.html
Interesting, thanks for the research. So now we know you use a Mac :-)
Sure? I think he use windows, take a look at the mail header:
Pegasus Mail for Windows (4.41, DE v4.41 R1)
Sure? I think he use windows, take a look at the mail header:
Pegasus Mail for Windows (4.41, DE v4.41 R1)
Right, I was misled by the thread on the Lua list he pointed to, that
focused on the rand() implementation on Mac OS and other BSD descendants
(I had overseen that it mentioned the same
Am 07.04.10 01:10, schrieb Wolfgang Werners-Lucchini:
Delete the tuc file with 'context --purgeall'.
This does not work! I get allways the same.
Delete
\startluacode
math.randomseed(os.time())
\stopluacode
in your file.
Wolfgang
On 7-4-2010 5:05, Aditya Mahajan wrote:
On Tue, 6 Apr 2010, Wolfgang Werners-Lucchini wrote:
Hallo,
I get allways (10 times at least) the same result:
-
\starttext
\startluacode
math.randomseed(os.time())
\stopluacode
Encode your
On Wed, Apr 7, 2010 at 5:05 AM, Aditya Mahajan adit...@umich.edu wrote:
On Tue, 6 Apr 2010, Wolfgang Werners-Lucchini wrote:
Hallo,
I get allways (10 times at least) the same result:
-
\starttext
\startluacode
I get allways (10 times at least) the same result:
-
\starttext
\startluacode
math.randomseed(os.time())
\stopluacode
Encode your Name and Surname as a
\startluacode
local a = {'null-terminated', 'dollar-terminated',
Delete the tuc file with 'context --purgeall'.
This does not work! I get allways the same.
Delete
\startluacode
math.randomseed(os.time())
\stopluacode
in your file.
Now it works. But WHY?
Wolfgang
Now it works. But WHY?
Because that's the way random number generators works. They're not
random at all, they generate completely predictable number sequences
from a seed: each time you use the same seed, you get the exact same
sequence. In your case, you used os.time() as a seed, which is
Now it works. But WHY?
Because that's the way random number generators works. They're
not
random at all, they generate completely predictable number
sequences
from a seed: each time you use the same seed, you get the exact
same
sequence. In your case, you used os.time() as a seed,
I know this and I have triggerd this by hand. So there is a lot of
time between. I have purged files between every run and I got the
same result if I wait 1 second, 1 minute or 1 day.
Well, then it probably qualifies as a bug, and, since the .tuc file
has apparently been dismissed as a
Am 06.04.10 00:21, schrieb Wolfgang Werners-Lucchini:
Hallo,
I get allways (10 times at least) the same result:
-
\starttext
\startluacode
math.randomseed(os.time())
\stopluacode
Encode your Name and Surname as a
On Tue, 6 Apr 2010, Wolfgang Werners-Lucchini wrote:
Hallo,
I get allways (10 times at least) the same result:
-
\starttext
\startluacode
math.randomseed(os.time())
\stopluacode
Encode your Name and Surname as a
\startluacode
local a
Hallo,
I get allways (10 times at least) the same result:
-
\starttext
\startluacode
math.randomseed(os.time())
\stopluacode
Encode your Name and Surname as a
\startluacode
local a = {'null-terminated', 'dollar-terminated', 'Pascal'}
Am 06.04.10 00:21, schrieb Wolfgang Werners-Lucchini:
Hallo,
I get allways (10 times at least) the same result:
-
\starttext
\startluacode
math.randomseed(os.time())
\stopluacode
Encode your Name and Surname as a
\startluacode
local a
The following produces one red square and two black ones, as opposed
to one red and two randomly perturbed but also red ones I was hoping
for. To my poor understanding this usage seems to comply with that
defined in mp-tool.mp. What am I doing wrong.
Regards, Johan
\setupcolors[state=start]
Johan Sandblom wrote:
The following produces one red square and two black ones, as opposed
to one red and two randomly perturbed but also red ones I was hoping
for. To my poor understanding this usage seems to comply with that
defined in mp-tool.mp. What am I doing wrong.
hint: your redpart
Well, being stupid isn't much fun, you know. One of the few
consolations is bothering knowledgable people with questions that you
are unable to figure out the (albeit obvious) answer to ...
Thank you, Johan
2006/3/6, Taco Hoekwater [EMAIL PROTECTED]:
Johan Sandblom wrote:
The following
30 matches
Mail list logo