Talk:Galton box animation: Difference between revisions

From Rosetta Code
Content added Content deleted
(Here are some notes that could be used.)
m (wiki formatting)
Line 19: Line 19:


O Total: 75
O Total: 75

O *
O *

* O *
* O *

* * O *
* * O *

* * * * O
* * * * O

* * * * O *
* * * * O *

* * O * * * *
* * O * * * *

A B C D E F G
A B C D E F G

A = 003 B = 005 C = 013 D = 028
A = 003 B = 005 C = 013 D = 028
E = 011 F = 002 G = 006
E = 011 F = 002 G = 006

Revision as of 20:09, 12 July 2011

General

: Have an image but need to upload it (not sure how) --Dgamey 12:09, 6 May 2011 (UTC)

The task probably needs more specification

--Dgamey 02:09, 6 May 2011 (UTC)

In a galton box, there are a set of pins arranged in a triangular pattern. A number of balls are dropped in such a manner that they fall in line with the top pin, before moving either to the left or the right of the pin. The ball continues to fall to the left or right of subsequent pins before arriving at one of the collection points between and to the sides of the bottom row of pins.
For the purpose of this task the box should have at least 5 pins on the bottom row, and can be drawn graphically, or using ascii, depending upon the capabilities of the language.

The program should simulate the release and arrival of balls, and should continue to release new balls, until there is no more space left to fill the bottom containers (if they are drawn graphically), or until the number in any one container reaches 950.

A running total of the number of balls released should be maintained, and a tally of the number of balls for each arrival point should be displayed at the bottom of the screen.

It is permissible to show the tally numerically, or as a bar chart or pictogram, depending on the capabilities of the language.

Here is an ascii sketch that could be used:

            O     Total: 75

          O *

          * O *

        *   * O *

      *   *   *   * O

    *   *   *   * O *

  *   * O *   *   *   *

A   B   C   D   E   F   G

A = 003   B = 005   C = 013   D = 028
E = 011   F = 002   G = 006

Markhobley 20:08, 12 July 2011 (UTC)