|
||||||||
Magnattractor |
||||||||
|
Description Magnattractor is a magnetic attractor system and renderer. Similar in concept to other attractor systems where a number of control points are iterated through a given set of functions in order to build up an image that represents a histogram of control point locations. Denser areas of the histogram represent points "on" the attractor. Applets Algorithm The attractor of this system consists of a number of virtual magnets, or rather, virtual "anti-magnets". Each magnet exerts a force upon the control point in proportion to its distance from the control point. The greater the distance, the greater the force, thus "anti" magnet. The sum of those forces at any given moment then controls the movement of the control point.
Magnet locations are shown in cyan, field strength is represented by grays. The various parameters controlling the strength of the magnet forces are constrained within limits that tend to produce more interesting images. The "magic" of the system lies in a balancing act between forces that are too strong and would overly collapse the graph versus forces that are too weak and would overly disperse the graph. Within that range however a wide variety of interesting images can be produced.
The image above is the result of the forces shown above. Color is assigned based on the current velocity of the control point. Additional complexity is introduced into the system by having half of the magnets in the system calculate distance differently. Thus the overall system never quite "agrees" on the sum total of forces to apply, further preventing collapse of the graph. Nitty Gritty Representing the attractor as a set of "magnets" was merely a programming abstraction for convenience - the entire attractor could have been written out as a single complex equation and plotted as any other attractor system. Something along the lines of: x' = Σ ai * norm(bi - x) + ci * norm(di - y) Except... that I simplify the formula considerably in the applet above with the "magnet" abstraction, reducing the number of variables needed while still preserving much of the flexibility. This also tends to make it a bit more "productive", generating something at least somewhat interesting given total random parameters - a desirable quality in a demo applet. All of this is dervied from a larger family of equations I call the "Fungal" attractor. I'd like to claim that it's an original discovery -- at least to the best of my knowledge it's never been described elsewhere. The equations are easily extended to 3D by introducing corresponding Z terms and coefficients. However it does start to become a bit unwieldy at this point, something like this: x' = Σ ai * norm(bi - x) + ci * norm(di - y) + ei * norm(fi - z) Further, the equations can be extended to 3.5D or 4D by introducing yet another term and corresponding coefficients, allowing one to animate through slices or volumes of a larger hyperspace. Gallery Because no one wants to wait an hour to see them generated online... :-D Five hundred million histogram samples and at higher resolution with a fancier final rendering pass:
|
||||||||
|
||||||||
© 2006 Dave Bollinger | ||||||||