A filter effect that plots the probability distribution of a quantum wave function.
This filter effect uses a quantum wave function algorithm to generate a plot of electron probability density. Ignoring its scientific value, the formula can be exploited for its aesthetic qualities. It can be used as an alternative to the radial gradient for generating more interesting shapes for example.
The rendering of the wave function is controlled by its parameters N, L and M. A Scale is also provided to deal with situations where the generated plot would otherwise be too large for its bounds.
The parameter values are clamped according to the rules N >= 1
, 0 <= L < N
, -L <= M <= L
. Check that the values are assigned and clamped correctly if the wave function is not rendering as expected.
The WaveFunctionFX class consists of the following fields:
Access | Name | Type | Comment |
---|---|---|---|
ColourMap | STRING | Assigns a pre-defined colourmap to the wave function. | |
An alternative to defining colour Stops in a wave function is available in the form of named colourmaps. Declaring a colourmap in this field will automatically populate the wave function's gradient with the colours defined in the map. We currently support the following established colourmaps from the matplotlib and seaborn projects: The use of colourmaps and custom stops are mutually exclusive. | |||
L | INT | Azimuthal quantum number. | |
M | INT | Magnetic quantum number. | |
N | INT | Principal quantum number. | |
Scale | DOUBLE | Multiplier that affects the scale of the plot. | |
Stops | STRUCT [] | Defines the colours to use for the wave function. | |
The colours that will be used for drawing a wave function can be defined by the Stops array. At least two stops are required to define a start and end point for interpolating the gradient colours. If no stops are defined, the wave function will be drawn in greyscale. | |||
XMLDef | STRING | Returns an SVG compliant XML string that describes the effect. |
The following actions are currently supported:
Name | Comment | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Draw | Render the effect to the target bitmap. | |||||||||||
ERR acDraw(*Object, DOUBLE X, DOUBLE Y, DOUBLE Width, DOUBLE Height)
|
Class Info | |
---|---|
ID | ID_WAVEFUNCTIONFX |
Category | Graphics |
Include | modules/wavefunctionfx.h |
Version | 1 |