Software algorithm for simulating Dalton board

By designing a software algorithm to simulate Dalton board, simulate Dalton board experiments and generate animations, the problems of cumbersome, high cost and difficult to repeat in traditional experiments are solved, efficient and intuitive experimental simulation and parameter adjustment are achieved, and the understanding of probability statistical laws is enhanced.

CN120220508APending Publication Date: 2025-06-27LIAONING INST OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510370620.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

Traditional Dalton board experiments require actual construction devices, which are cumbersome to operate, are costly and difficult to perform large-scale repeated experiments and parameter adjustments.

Method used

By designing a software algorithm that simulates Dalton board, using a computer program to simulate Dalton board experiments, generate animations and insert them into teaching software, allowing users to intuitively observe the collision process and final distribution of balls on the computer, and conveniently adjust the experimental parameters.

Benefits of technology

It realizes efficient and intuitive simulation of the Dalton board experiment on computers, overcomes the limitations of traditional experiments, improves the experimental efficiency and repeatability, and enhances the understanding of probability statistical laws.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120220508A_ABST
    Figure CN120220508A_ABST
Patent Text Reader

Abstract

The invention relates to an algorithm for simulating Dalton board software, and belongs to the technical field of computer simulation. According to the algorithm, a Dalton plate experiment is simulated through a computer program, so that a user can visually observe the collision process of a small ball between nails and the final distribution condition on a computer. According to the main technical scheme, the method comprises the following steps: initializing parameters (window size, nail parameters, partition plate parameters and small ball parameters) of a Dalton plate; drawing nails and partition plates; initializing a small ball queue and releasing the small balls according to a set time interval; simulating the movement of the small ball, including collision detection, direction deflection and position updating; and carrying out stacking treatment after the small balls reach the bottom. The method has the advantages of intuition, flexibility, high efficiency, repeatability and the like, the limitation of a traditional experiment can be overcome, and an efficient and convenient tool is provided for probability statistics teaching and research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a software algorithm for simulating a Dalton board, belonging to the field of computer simulation technology, and is particularly suitable for intuitively and efficiently simulating the Dalton board experiment, and can be used in fields such as education, scientific research, and probability statistics. Background Art

[0002] The Dalton board is a classic physical experiment device used to demonstrate the distribution law of small balls under random collisions, and is widely used in the teaching and research of disciplines such as probability theory and statistics. The traditional Dalton board experiment requires actual setup of the device, which is inconvenient to carry, has cumbersome operations and high costs. At the same time, the experimental results are restricted by physical conditions, making it difficult to conduct large-scale repeated experiments and parameter adjustments. With the development of computer technology, using computer software to simulate the Dalton board has become a feasible and efficient method. It can change the number of small balls at any time, observe the comparison of results when the number of small balls is different, overcome the limitations of traditional experiments, and bring a more convenient and intuitive experimental experience to users. Summary of the Invention

[0003] The present invention aims to provide an algorithm for a Dalton board simulation software, which can accurately simulate the Dalton board experiment through a computer program, and can also generate an animation software to be inserted into teaching software, enabling users to intuitively observe the collision process of small balls between nails and the final distribution on the computer, while conveniently adjusting experimental parameters and conducting multiple repeated experiments to better understand the probability and statistics laws.

[0004] Technical Solution The software algorithm for simulating the Dalton board of the present invention mainly includes the following key steps:

[0005] Parameter Initialization: Set the basic parameters of the Dalton board, including window size, nail parameters (number of nail rows, number of nail columns, size, area height, starting position, horizontal spacing, vertical spacing), partition parameters (partition height, partition spacing, partition width, number of partitions), and small ball parameters (small ball size, speed, initial horizontal position, initial vertical position, number, appearance time interval).

[0006] Nail Drawing: Arrange nails in the simulation window according to the set number of rows and columns, with odd rows and even rows staggered by half a spacing to simulate the real Dalton board structure.

[0007] Partition Drawing: Draw partitions at the bottom of the simulation window. The number of partitions is the same as the number of nail columns and they are arranged at equal intervals to receive the falling small balls and display the final distribution.

[0008] Small Ball Management: Initialize the small ball queue and release small balls sequentially at the set time interval to simulate the continuous falling process of small balls.

[0009] Simulation of the movement of small balls: For each released small ball, set its initial position and velocity, and in real time detect its collision with the nails during the falling process. If a collision occurs, randomly select to deflect to the left or right, and at the same time detect whether the small ball reaches above the baffle, and limit its horizontal position between the baffles. By continuously updating the position of the small ball, simulate the falling trajectory of the small ball until the small ball reaches the bottom of the simulation window.

[0010] Processing of small ball stacking: When the small ball reaches the bottom of the simulation window, determine the baffle interval it falls into according to its final position, and stack it according to the stacking rules within this interval. The specific stacking rules include calculating the number of columns and layers of small balls that can be accommodated in the current baffle interval, obtaining the stacking state of the current baffle interval, finding the first empty position and placing the small ball at this position, and at the same time updating the stacking state.

[0011] Beneficial effects The software algorithm of the simulated Dalton board of the present invention has the following remarkable advantages:

[0012] Intuitiveness: Through the computer graphics interface, it intuitively shows the collision process of small balls among the nails and the final distribution, enabling users to clearly observe the physical phenomena of the Dalton board experiment and enhancing the understanding of probability and statistics laws.

[0013] Flexibility: Users can conveniently adjust the experimental parameters, such as the number of nails, the speed of small balls, the number of small balls, etc., to observe the experimental results under different parameter conditions and meet different teaching and research needs.

[0014] Efficiency: It can complete the simulation of the falling and distribution of a large number of small balls in a short time, avoiding the cumbersome process of repeated setup and operation in traditional experiments and improving the experimental efficiency.

[0015] Repeatability: It can easily conduct multiple repeated experiments, facilitating users to compare and analyze the experimental results and verify the stability of probability and statistics laws. Specific implementation manners

[0016] The following combines specific code examples to elaborate in detail on the software algorithm of the simulated Dalton board of the present invention.

[0017] Parameter initialization: Set the window size, the number and size of small balls, the height and thickness of the baffle, and the initial position of the small balls according to needs.

[0018] Nail drawing: Arrange the nails in the simulation window according to the set number of rows and columns, with odd rows and even rows staggered by half a spacing to simulate the real Dalton board structure. Such a setting can make the small balls reach the nail positions with equal probability, which conforms to the Dalton board principle.

[0019] Partition drawing: Set the height and width of the partition as needed. Here, the partition intervals are set to be uniform.

[0020] Ball management: The balls are set to fall successively from the same position.

[0021] Ball motion simulation: When the ball hits a nail, it moves left or right with equal probability.

[0022] Ball stacking process: When the ball falls on the partition, it should not pass through the partition. It needs to fall along the boundary of the partition and start stacking at the bottom of the partition. Description of the drawings

[0023] The following further describes the present invention in detail with reference to the drawings. The language used in the program is Python 3.8. The following is the interface after the small program runs: Figure 1 : [1] represents the ball, [2] represents the nail, and [3] represents the partition Figure 2 : Screenshot during the ball falling process after the program runs Figure 3 : Screenshot after the balls have completely fallen after the program runs.

Claims

1. Claim 1 A software algorithm for simulating a Dalton plate, characterized in that: The following steps are involved: Initialize the parameters of the Dalton board, including window size, nail parameters (number of nail rows, number of columns, size, area height, starting position, horizontal spacing, vertical spacing), partition parameters (partition height, partition spacing, partition width, number of partitions), and ball parameters (ball size, speed, initial horizontal position, initial vertical position, number, appearance time interval); In order to ensure that the ball hits the nails with equal probability, the nails are drawn in the simulation window and arranged according to the set number of rows and columns, and the odd and even rows are staggered by half a spacing; Draw partitions at the bottom of the simulation window. The number of partitions should be the same as the number of nail columns and they should be arranged at equal intervals. Initialize the team array and release the balls in sequence at set time intervals; For each pellet released, proceed as follows: a. Set the initial position and initial velocity of the ball; b. During the falling process of the ball, the collision between the ball and the nail is detected in real time. If a collision occurs, the ball is randomly deflected to the left or right; c. Detect whether the ball reaches above the partition. If so, further detect whether it is between the partitions. If so, limit its horizontal position; d. Update the position of the ball and repeat the above steps until the ball reaches the bottom of the simulation window; When the ball reaches the bottom of the simulation window, the partition interval into which it falls is determined according to its final position, and it is stacked in this interval according to the stacking rules.

2. Claim 2 A software algorithm for simulating a Dalton plate according to claim 1, characterized in that: In step 5, the deflection direction of the ball after the collision with the nail is determined by a random function, specifically: if the return value of the random function is less than 0.5, the ball deflects to the left, otherwise it deflects to the right.

3. Claim 3 A software algorithm for simulating a Dalton plate according to claim 1, characterized in that: In step 6, the method for determining the partition interval into which the ball falls is: checking the final position of the ball and the horizontal coordinate range of each partition in turn, and if the final position of the ball is within the horizontal coordinate range between two partitions, it is determined that the ball falls into the partition interval.

4. Claim 4 A software algorithm for simulating a Dalton plate according to claim 1, characterized in that: In step 6, the accumulation rule of the balls in the partition interval is: Calculate the number of columns and layers of balls that can be accommodated by the current partition spacing; Get the stacking status of the current partition interval; If the current partition interval is full, return directly; Find the first empty spot, place the ball there, and update the stacking state.

5. Claim 5 A software algorithm for simulating a Dalton plate according to claim 1, characterized in that: In step 4, the release of the balls is achieved through the timer of the simulation software, and the balls are taken out from the queue in sequence at set time intervals and start to fall.