Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #5790

Re: Specific numbers but in a random sequence

From Richard Ashbery <basura@invalid.addr.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: Specific numbers but in a random sequence
Date 2019-06-24 20:13 +0100
Organization None
Message-ID <57c94a3c9bbasura@invalid.addr.uk> (permalink)
References <57c7c5d6c0basura@invalid.addr.uk> <qepujq$a34$1@solani.org>

Show all headers | View raw


In article <qepujq$a34$1@solani.org>, Sebastian Barthel
<naitsabes@freenet.de> wrote:
> Am Fri, 21 Jun 2019 21:31:03 +0100 schrieb Richard Ashbery:

> > The following variables can be used to calculate precise angles
> > through which an object can be rotated. The first rotates object
> > through 360/3 = 120 degrees, the next one 360/4 = 90 degrees and
> > so on. Each calculation creates an integer with no decimal places.
> > 
> > 3,4,5,6,8,9,10,12,15,18,20,24,30,36,45,60,90,120
> > 
> > I would like to be able to use these variables in a random
> > sequence. Has anyone a BASIC routine that could do this please?


> Is there a special reason why the "40" and "72" are missing in this
> line ? If they would exist, the numbers may be seen as a
> symmetrical object with its "half" between 18 and 20.

My poor observation skills, I suspect. The first time I went down the
list to find only integers after the 360/N division - I must have
missed some. I have since added "IF 360 MOD N < 1" to print only
integers - should have done it earlier. Have now added 40 and 72 to
Steve's submission and 2 (Druck's suggestion) - thank you.

> > 3,4,5,6,8,9,10,12,15,18,20,24,30,36,(40),45,60,(72),90,120

> with 360/N

> 120,90,(72),60,45,40,36,30,24,20,18,15,12,10,(9),8,6,5,4,3


> Therefore it probably could increase the "randomness" if You chosse
> to calculate two random values:

> the first one to choose from an array(N), with only the first ten
> numbers in it, as described by many earlier.

> the second random value as RND(2) which chooses the number N from
> the array directly as the result if it is "1", otherwise, if it is
> "2", the result is calculated as 360/N.

More knowledgeable programmers required to comment on this.

Richard

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-21 21:31 +0100
  Re:Specific numbers but in a random sequence Gavin Crawford <gc@dentrassis.com> - 2019-06-21 22:27 +0100
    Re: Specific numbers but in a random sequence druck <news@druck.org.uk> - 2019-06-22 11:48 +0100
      Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-22 12:03 +0100
      Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-22 16:46 +0100
        Re: Specific numbers but in a random sequence Someone Somewhere <nntpac@gmail.com> - 2019-06-22 17:11 +0100
          Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-22 18:21 +0100
            Re: Specific numbers but in a random sequence Steve Fryatt <news@stevefryatt.org.uk> - 2019-06-22 21:29 +0100
              Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-23 11:17 +0100
                Re: Specific numbers but in a random sequence Ian <Ian.Hamilton@AAUG.net> - 2019-06-23 12:07 +0100
                Re: Specific numbers but in a random sequence Paul Oates <oatespaul@btinternet.com> - 2019-06-23 13:17 +0100
                Re: Specific numbers but in a random sequence Steve Fryatt <news@stevefryatt.org.uk> - 2019-06-23 13:51 +0100
                Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-23 14:10 +0100
                Re: Specific numbers but in a random sequence Steve Fryatt <news@stevefryatt.org.uk> - 2019-06-23 15:59 +0100
                Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-23 17:14 +0100
                Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-23 14:01 +0100
        Re: Specific numbers but in a random sequence Paul Oates <oatespaul@btinternet.com> - 2019-06-22 17:52 +0100
        Re: Specific numbers but in a random sequence Julian Fry <julianfry@orpheusmail.co.uk> - 2019-06-22 17:56 +0100
        Re: Specific numbers but in a random sequence Julian Fry <JulianFry@compuserve.com> - 2019-06-22 18:05 +0100
  Re: Specific numbers but in a random sequence Sebastian Barthel <naitsabes@freenet.de> - 2019-06-24 07:37 +0000
    Re: Specific numbers but in a random sequence Richard Ashbery <basura@invalid.addr.uk> - 2019-06-24 20:13 +0100

csiph-web