Talk:Galton box animation

From Rosetta Code
Revision as of 00:03, 14 September 2011 by rosettacode>Crazyfirex (→‎Very cool!: new section)

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.
ok to add - good description --Dgamey 02:43, 13 July 2011 (UTC)
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.
also ok to add - good idea --Dgamey 02:43, 13 July 2011 (UTC)

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.

Why 950?? Why full (for graphical)?? Why not just state how many will be dropped and/or the approach? --Dgamey 02:43, 13 July 2011 (UTC)

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.

Optionally --Dgamey 02:43, 13 July 2011 (UTC)

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

also optional--Dgamey 02:43, 13 July 2011 (UTC)
I'm open to it allowing ascii, but is it still an animation? If the solution is graphical should animation be a requirement or an option? Should we consider renaming? --Dgamey 02:43, 13 July 2011 (UTC)
You can have animation in ASCII with curses control, or just by asking to "press return after each frame". --Paddy3118 06:00, 13 July 2011 (UTC)
Yeah, my sketch below shows the balls falling. These would be animated. You can see tha the bottom ball lands in container C, on the next frame the ball above it will fall into E or F, and so on. (However, I drew this in notepad, so we have to imagine at this time :P) Markhobley 06:48, 13 July 2011 (UTC)

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)

Well, 950 fitted nicely with my 3 digit layout above, taking into account some balls are still falling :). You are free to edit what I have written to suit what you want and paste it into the task description. I will leave it with you to ponder over, if you like. Markhobley 05:52, 13 July 2011 (UTC)
Modified the task description. Let's get some more feedback. --Dgamey 13:01, 13 July 2011 (UTC)
Bwahhh! You didn't use my sketch! :P :P :P Markhobley 13:28, 13 July 2011 (UTC)

Very cool!

I think this is a great task! I will be cooking up an example soon enough. This is one of the better (IMO) draft tasks here; I don't see why more examples aren't present. --Crazyfirex 00:03, 14 September 2011 (UTC)