Magnetpendel über drei Magneten
The program describes the behaviour of a magnet that oscillates on a thread and is suspended above three magnets arranged in the shape of an equilateral triangle. The oscillating magnet is attracted by all three other magnets and, after following a complicated path, chooses one of the three magnets above which it comes to rest. Due to frictional losses, this is a dissipative system that has three attractors. In this case, the attractors are simply points above the magnets. More interesting in this case is the catchment area of the attractors. The program displays the three catchment areas of the magnets (attractors) in different colors. The boundary line between these catchment areas has a fractal dimension, while the catchment areas themselves are two-dimensional.
Operation
Press the Start button to begin a calculation in which the pendulum is started point by point at the location of the pixel and its trajectory is calculated until an attractor is reached. The pixel is then colored in the corresponding color. The movement of a single pendulum swing can be followed by ticking the "Show trajectory" box. If the check mark is removed again, the image continues to calculate. The damping parameter can be set between 0.05 and 0.1. This allows you to influence how long the magnet oscillates before it comes to rest and therefore how finely structured the catchment area of the attractors is. Either a force proportional to 1/r2 (Coulomb law for electric charges) or proportional to 1/r3 for the force between magnetic dipoles can be selected as the force law. The image section can be zoomed in and out with Zoom. By clicking on a point in the image, this point becomes the new center of the image section. No sections can be calculated by subsequently zooming in. The default settings are selected with Reset. The colors can be selected individually and the images can be saved. Any black pixels that appear mean that it has not yet been decided which magnet (attractor) will be reached before the maximum number of time steps is reached.
Numerical realization
The movement parameters are all normalized to the distance between the magnets, which is set to one. The pendulum moves at a height of 0.3. The forces are calculated without further parameters as 1/r2 or 1/r3, the mass is equal to one. The differential equation from Newton's action principle is calculated with Runge Kutta 4th order and a step size of 0.01. Depending on the attenuation, 1000 to 5000 time steps are calculated per pixel.