GB2076570A - Random Number Generator - Google Patents

Random Number Generator Download PDF

Info

Publication number
GB2076570A
GB2076570A GB8015976A GB8015976A GB2076570A GB 2076570 A GB2076570 A GB 2076570A GB 8015976 A GB8015976 A GB 8015976A GB 8015976 A GB8015976 A GB 8015976A GB 2076570 A GB2076570 A GB 2076570A
Authority
GB
United Kingdom
Prior art keywords
random
random numbers
numbers
generator
probability distribution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
GB8015976A
Other versions
GB2076570B (en
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
British Broadcasting Corp
Original Assignee
British Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by British Broadcasting Corp filed Critical British Broadcasting Corp
Priority to GB8015976A priority Critical patent/GB2076570B/en
Publication of GB2076570A publication Critical patent/GB2076570A/en
Application granted granted Critical
Publication of GB2076570B publication Critical patent/GB2076570B/en
Expired legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/582Pseudo-random number generators
    • G06F7/584Pseudo-random number generators using finite field arithmetic, e.g. using a linear feedback shift register
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/58Indexing scheme relating to groups G06F7/58 - G06F7/588
    • G06F2207/581Generating an LFSR sequence, e.g. an m-sequence; sequence may be generated without LFSR, e.g. using Galois Field arithmetic
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/58Indexing scheme relating to groups G06F7/58 - G06F7/588
    • G06F2207/583Serial finite field implementation, i.e. serial implementation of finite field arithmetic, generating one new bit or trit per step, e.g. using an LFSR or several independent LFSRs; also includes PRNGs with parallel operation between LFSR and outputs

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Generation (AREA)

Abstract

A random number generator provides substantially-random numbers with a substantially- Gaussian probability distribution, and comprises a 24-bit shift register (22) forming a chain code generator, the numbers defined by each of four groups of six bits, being added in an adder (24). The generator (2) is applied to an airbrush simulator for an electronic graphic system (Fig. 1), in which it constitutes a dedicated- hardware peripheral to supply random numbers to a computer controller, these random numbers being used to modify which storage locations are addressed in response to the output of a two-dimension graphics tablet. <IMAGE>

Description

SPECIFICATION Method of and Apparatus for Random Number Generation and Electronics Graphic System Incorporating the Same This invention relates to a method of and apparatus for generating essentially random numbers with an approximately Gaussian probability distribution, and to an electronics graphic system incorporating such apparatus.
A graphic artist will often resort to using an "airbrush" to effect shading (e.g. in representing side-lit solids) or to soften the transitions between areas of different hue and/or brightness. In essence, the airbrush is a hand-held "atomiser" in which a stream of compressed air passes over a hole in a small vessel containing paint, picks up small droplets of paint, and emerges from the circular jet of the "brush" as an aerosol of paint in a conical spray. Because the droplets have random transverse velocities, the spray cone has a radial probability density function (p.d.f.) approaching a Gaussian, so more droplets fall on or near the spray cone axis than far off-axis.A microscopic "pointillism" results, with the density of paint spots on the artwork depending on the proximity of the airbrush to the artwork and the duration of its use (and, obviously, air pressure, jet size, paint viscosity, etc). Gradual transitions between colours or shading are achieved with a sweeping motion as with spray painting.
In a typical electronic graphics system, the artist's input is from a "graphics tablet". The artist's "brush" strokes are converted to a sequence of co-ordinates representing successive positions of his "brush" (a pick-up stylus) on the tablet surface. A central processor converts these co-ordinates into pixel addresses in a frame store and accesses those pixels according to the action required. For example, in drawing a line in AMBER the processor writes to successively addressed pixel locations in the frame store a word which represents the colour amber.
In order to simulate airbrush effects, the processor must write the appropriate word to random pixels surrounding the one which represents the present stylus position. To be convincing, not only must the spatial distribution of written pixels about the reference appear to be correct, but also a reasonable number of such pixels, must be written for every stylus position~ it should not be necessary to wait a long time to get the effect of a dense spray and the system should respond to practical speeds of sweeping the "brush" over the tablet.
Simply making pseudo-random numbers by software is invariably a slow process especially if the sequence is to have an adequately long repetition rate, and if a Gaussian-like p.d.f. is required.
The present invention assists in the reduction of at least some of these problems, and is defined in the appended claims.
The invention will now be described by way of example, with reference to the drawings, in which:~ Figure 1 is a general block diagram of an electronic graphics system; Figure 2 is a graph illustrating true and pseudo Gaussian probability functions; Figure 3 is a block diagram of a pseudo random number generator providing a Gaussian-like probability density function; and Figure 4 is a detailed circuit diagram of the random number generator.
Figure 1 shows the basic elements of an electronic graphics system enabling a graphic artist to draw a picture or illustration \which is electronically stored and is displayed as he draws it.
The system includes a sensitive graphics tablet 10 which has a surface across which a stylus can be drawn and which generates output signals representing in two co-ordinate form the instantaneous position at which the stylus is pressed on the tablet. The output of the tablet 10 is passed to a computer or controller unit 12, which, possibly after conducting certain checks on the data, stores the coordinate data in associated addresses of a digital frame-store 14.
This is done by storing a colour indicator signal at each storage location which corresponds to a spot of that colour on the picture.
The content of the frame store 14 is continuously scanned and applied through digitalto-analogue converter circuitry 16 to a visual display unit (VDU) 18 comprising a cathode ray tube. The converter circuitry 16 may comprise three digital-to-analogue converters providing three output signals respectively representing the red, green and blue components of the colour to be displayed. These signals can then be applied to the R, G and B inputs of a colour monitor. It will be appreciated, however, that the system can woe used for texturing monochrome artwork.
In accordance with this invention the computer 12 comprises or is provided with a dedicated hardware psuedo-random number generator 20 of a type which provides random numbers with an approximately Gaussian probability density function. The generator operates on the principle that the p.d.f. of the sum of a large number of independent random variables approaches a Gaussian curve, regardless of the p.d.f. of the component variables. It is therefore possible to produce a random variable with an approximately Gaussian p.d.f. by summing sufficient independent random variables generated by any desired method. Figure 2 shows the p.d.f. of a pseudo Gaussian comprising the sum of only 4 uniformly distributed independent random variables each ranging from~1 to approximately + 1 (actually + 127/128), against the true Gaussian curve with the same variance.Although the probability of the mean is lower than for the true Gaussian, the shape and spatial extent of the p.d.f. is very similar. Furthermore, an advantage, especially for digital signal processing, is that the pseudo-Gaussian has limits to signal magnitude; in Figure 2 there is zero probability of the sum being greater in magnitude than 4. Naturally, taking more variables for the sum leads to a result closer to the Gaussian.
Figure 3 shows in schematic form hardware used to generate pseudo-random numbers with a pseudo-Gaussian probability distribution. A 24-bit m sequence generator 22 of the feedback type is used, with the 24 stages providing between them four six-bit random numbers. These numbers are produced simultaneously and continuously, and are summed in an adder 24, the most significant bit of the sum being inverted. This will produce a 2's complement 8-bit resultant, with zero mean and ranging between~1 and +127/128.
In use in the system of Figure 1, the generator 20 is accessed by the computer 12 when a random number is required in response to a request for airbrush techniques. When this happens the instantaneous output of adder 24 is latched in a latch 26 and returned to the computer as data. The latching takes place without interrupting the m sequence register 22, and enables the computer 12 to read the latched number over several system clock periods. When airbrush technique simulation is required, the computer adds a pair of random numbers to the individual pair of x, y coordinates of the reference address from the tablet 10 and uses these as new address pairs. Thus, for a reference or data input (x, y), access is made in the frame store to (x+Ax, y+Ay) where Ax and by are the random numbers.
This operation is repeated at a rate or for a time period sufficient to give a predetermined mean spot density.
Typically the computer 12 in Figure 1 may be a 8085A based microcomputer. A maximum "airbrush width" of 256 pixels (picture elements), approximately one-third of the picture width and 4/9th of the picture height, is ample for most purposes, so the system illustrated provides 8-bit random numbers with a p.d.f. the continuous form of which corresponds to the pseudo-Gaussian of Figure 2.
Because the m sequence register 22 in Figure 3 works with system clock pulses, every 24 clock pulses (representing 2, 3 or 4 instruction periods only) a completely independent set of pseudorandom values are presented for access. A single IN instruction occupies the 8085 microprocessor for 10 clock cycles alone, and this is used to access the random number generator. As subsequent additional processing will be done with the input data value, successive accesses to the generator in practical cases will be more than 24 system clock pulses apart and will result in independent values being read. Additionally, the long sequence length (224-1) and the variable period between accesses will ensure a proper spread of values.
When used to implement a graphics airbrush, the visual effect is convincing and easy to control and the speed of operation high. The technique can be extended for greater accuracy by the addition of more uniform values either by software addition of successive outputs from the present circuit, or by providing more values to add within the hardware. If independent values are to be obtained, the increase of register length must be balanced against access time, the practical delay in clock pulses between successive accesses to the generator; it may prove necessary to run several separate generators with different sequence lengths.
It will be appreciated that the 24 bit m sequence register 22 can be replaced by a register of different size, i.e. one providing r words each of p bits. There are then r.p register stages, and the adder output word contains (p+log2r) bits.
Figure 4 is a more detailed block diagram of the generator. The diagram indicates the relevant integrated circuit component numbers and these details are not therefore repeated here. The input/output or I/O address 13D accesses the pseudo-Gaussian p.d.f. values. In addition an address 12D accesses a uniform p.d.f. random number formed from 8 parallel bits from the m sequence register which are separately latched. A counter circuit detects the stable "all-zeroes" state in the shift register and in the presence of all zeroes stuffs a one into the feedback loop to avoid lock-up.

Claims (4)

Claims
1. A method of generating substantially random numbers with a substantially Gaussian probability distribution, comprising generating a plurality of essentially-independent random or pseudo-random numbers, and combining the numbers thus generated to provide an output.
2. Apparatus for use in the method of claim 1, comprising one or more psuedo-random chain code generators, and means for adding the numbers represented by a plurality of groups of generator stages to provide a substantially random output number having a substantially Gaussian probability distribution.
3. An electronic graphic system comprising a two-dimensional input device, a store capable of providing locations corresponding to individual elemental areas of the input device, control means for entering data into the store in response to the output of the input device, and a dedicated- handwave generator coupled to the control means and adapted to provide substantially random numbers with a substantially Gaussian probability distribution to modify the storage locations which are addressed by the control means so as to simulate an air-brush technique.
4. A system according to claim 3, in which the generator comprises apparatus according to claim 2.
GB8015976A 1980-05-14 1980-05-14 Random number generator Expired GB2076570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
GB8015976A GB2076570B (en) 1980-05-14 1980-05-14 Random number generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
GB8015976A GB2076570B (en) 1980-05-14 1980-05-14 Random number generator

Publications (2)

Publication Number Publication Date
GB2076570A true GB2076570A (en) 1981-12-02
GB2076570B GB2076570B (en) 1983-11-09

Family

ID=10513429

Family Applications (1)

Application Number Title Priority Date Filing Date
GB8015976A Expired GB2076570B (en) 1980-05-14 1980-05-14 Random number generator

Country Status (1)

Country Link
GB (1) GB2076570B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4931784A (en) * 1986-06-19 1990-06-05 Rank Cintel Limited Computer graphics
EP0449400A1 (en) * 1990-01-23 1991-10-02 Crosfield Electronics Limited Electronic airbrushing
EP2372528A1 (en) * 2010-03-22 2011-10-05 Astrium Limited Pseudo-noise generator
EP3474134A1 (en) * 2017-10-20 2019-04-24 Graphcore Limited Generating randomness in neural networks

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4931784A (en) * 1986-06-19 1990-06-05 Rank Cintel Limited Computer graphics
EP0449400A1 (en) * 1990-01-23 1991-10-02 Crosfield Electronics Limited Electronic airbrushing
EP2372528A1 (en) * 2010-03-22 2011-10-05 Astrium Limited Pseudo-noise generator
WO2011117197A3 (en) * 2010-03-22 2011-11-17 Astrium Limited Pseudo-noise generator
EP3474134A1 (en) * 2017-10-20 2019-04-24 Graphcore Limited Generating randomness in neural networks
CN109697048A (en) * 2017-10-20 2019-04-30 图核有限公司 Randomness is generated in neural network
JP2019079523A (en) * 2017-10-20 2019-05-23 グラフコアー リミテッドGraphcore Limited Generating randomness in neural networks
GB2568660A (en) * 2017-10-20 2019-05-29 Graphcore Ltd Generating randomness in neural networks
US10613833B2 (en) 2017-10-20 2020-04-07 Graphcore Limited Generating randomness in neural networks
GB2568660B (en) * 2017-10-20 2020-10-14 Graphcore Ltd Generating Random Numbers Based on a Predetermined Probaility Distribution in an Execution Unit
TWI717646B (en) * 2017-10-20 2021-02-01 英商葛夫科有限公司 Generating randomness in neural networks
US11334320B2 (en) 2017-10-20 2022-05-17 Graphcore Limited Generating randomness in neural networks
CN109697048B (en) * 2017-10-20 2024-03-22 图核有限公司 Generating randomness in a neural network

Also Published As

Publication number Publication date
GB2076570B (en) 1983-11-09

Similar Documents

Publication Publication Date Title
Noll The digital computer as a creative medium
EP0677824B1 (en) An electronic graphic system
US4189744A (en) Apparatus for generating signals representing operator-selected portions of a scene
US4189743A (en) Apparatus and method for automatic coloration and/or shading of images
JP3359120B2 (en) Image data processing method and apparatus
JP3359119B2 (en) Image data processing method and apparatus
Stotz Man-machine console facilities for computer-aided design
JPS6232476B2 (en)
US5060169A (en) Video simulation of an airbrush spray pattern
US6496160B1 (en) Stroke to raster converter system
US6731300B2 (en) Efficient anti-aliased dot rasterization
JPH0778710B2 (en) Video image forming device
US6091425A (en) Constant multisample image coverage mask
GB2076570A (en) Random Number Generator
AU8278287A (en) Video display simulator and analyzer
JP2552113B2 (en) Video image forming device
Teo et al. E cient linear re-rendering for interactive lighting design
US5714975A (en) Apparatus and method for generating halftoning or dither values
US5357265A (en) Electronic graphic system
EP0494325B1 (en) Apparatus for editing and creating video image and method for editing and creating video image
KR100260040B1 (en) Method and apparatus for determining texture coordinates in computer graphics
EP0497598B1 (en) An electronic graphic system
US5131056A (en) Electronic airbrushing
US4939673A (en) Method and apparatus for enhancement of display screen resolution
Myers Interactive Computer Graphics: Flying High Part II

Legal Events

Date Code Title Description
PCNP Patent ceased through non-payment of renewal fee