Parasol Framework
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Core
    • Display
    • Fluid
    • Font
    • Network
    • Vector
    • Audio
    • Sound
    • File
    • MetaClass
    • Module
    • StorageDevice
    • Task
    • Thread
    • Time
    • Compression
    • Config
    • Script
    • XML
    • Controller
    • BlurFX
    • ColourFX
    • CompositeFX
    • ConvolveFX
    • DisplacementFX
    • FilterEffect
    • FloodFX
    • ImageFX
    • LightingFX
    • MergeFX
    • MorphologyFX
    • OffsetFX
    • RemapFX
    • SourceFX
    • TurbulenceFX
    • WaveFunctionFX
    • Scintilla
    • ScintillaSearch
    • Bitmap
    • Clipboard
    • Display
    • Document
    • Font
    • Picture
    • Pointer
    • Surface
    • SVG
    • ClientSocket
    • HTTP
    • NetSocket
    • Proxy
    • Vector
    • VectorClip
    • VectorColour
    • VectorEllipse
    • VectorFilter
    • VectorGradient
    • VectorGroup
    • VectorImage
    • VectorPath
    • VectorPattern
    • VectorPolygon
    • VectorRectangle
    • VectorScene
    • VectorShape
    • VectorSpiral
    • VectorText
    • VectorTransition
    • VectorViewport
    • VectorWave

WaveFunctionFX Class

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.

Structure

The WaveFunctionFX class consists of the following fields:

Access
NameTypeComment
  ColourMapSTRINGAssigns 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: cmap:crest, cmap:flare, cmap:icefire, cmap:inferno, cmap:magma, cmap:mako, cmap:plasma, cmap:rocket, cmap:viridis.

The use of colourmaps and custom stops are mutually exclusive.

  LINTAzimuthal quantum number.
  MINTMagnetic quantum number.
  NINTPrincipal quantum number.
  ScaleDOUBLEMultiplier that affects the scale of the plot.
  StopsSTRUCT []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.

  XMLDefSTRINGReturns an SVG compliant XML string that describes the effect.

Actions

The following actions are currently supported:

DrawRender the effect to the target bitmap.
ERR acDraw(*Object, DOUBLE X, DOUBLE Y, DOUBLE Width, DOUBLE Height)
ParameterDescription
XThe X position of the region to be drawn.
YThe Y position of the region to be drawn.
WidthThe width of the region to be drawn.
HeightThe height of the region to be drawn.
WaveFunctionFX class documentation © Paul Manias © 2010-2025