Extends the Vector class with support for organising vectors into groups.
Groups provide a simple way of grouping vector objects. Groups have a passive effect on the drawing process and can be effective at assigning inheritable attributes to child vectors.
-
If there is a need to adjust the container dimensions, use a VectorViewport instead.
Manages the scene graph for a collection of vectors.
The VectorScene class acts as a container and control point for the management of vector definitions. Its main purpose is to draw the scene to a target Bitmap or Surface provided by the client.
-
Vector scenes are created by initialising multiple Vector objects such as VectorPath and VectorViewport and positioning them within a vector tree. The VectorScene must lie at the root.
+
Vector scenes are created by initialising multiple Vector objects such as VectorPath and VectorViewport and positioning them within a vector tree. The VectorScene must lie at the root of the tree.
The default mode of operation is for scenes to be manually drawn, for which the client must set the target Bitmap and call the Draw() action as required. Automated drawing can be enabled by setting the target Surface prior to initialisation. In automated mode the PageWidth and PageHeight will reflect the dimensions of the target surface at all times.
Vector definitions can be saved and loaded from permanent storage by using the SVG class.
Structure
The VectorScene class consists of the following fields:
Access
Name
Type
Comment
@@ -66,7 +66,7 @@
Error Codes
Error Codes
Okay
Operation successful.
Search
A definition with the given Name was not found.
NullArgs
Function call missing argument value(s)
SearchByID
Search for a vector by numeric ID.
ERR sc::SearchByID(OBJECTPTR Object, LONG ID, OBJECTPTR * Result)
Input
Description
ID
The ID to search for.
Result
This parameter will be updated with the discovered vector, or NULL if not found.
This method will search a scene for an object that matches a given ID (vector ID's can be set with the Vector⇒NumericID or Vector⇒ID fields). If multiple vectors are using the same ID, repeated calls can be made to this method to find them all. This is achieved by calling this method on the vector that was last returned as a Result.
Note that searching for string-based ID's is achieved by converting the string to a case-sensitive hash with strhash() and using that as the ID.
The default option is chosen by the system. This will typically be BILINEAR, but slow machines may switch to nearest neighbour and high speed machines could use more advanced methods.
VSM::BESSEL
VSM::BICUBIC
Produces a similar result to BILINEAR with a marginally sharper after-effect.
VSM::BILINEAR
Bilinear is a common algorithm that produces a reasonable quality image quickly.
VSM::BLACKMAN3
Five times slower than BILINEAR, the final result will lack sharpness when compared to SINC3.
VSM::BLACKMAN8
15 times slower than BILINEAR, the final result is of excellent quality and sharpness is well balanced.
VSM::GAUSSIAN
VSM::KAISER
VSM::LANCZOS3
This well known algorithm may serve as a point of comparison for evaluating the results of other methods. It shares characteristics with SINC and BLACKMAN.
VSM::LANCZOS8
VSM::MITCHELL
VSM::NEIGHBOUR
Nearest neighbour is the fastest sampler at the cost of poor quality.
VSM::QUADRIC
VSM::SINC3
Five times slower than BILINEAR, the final result is of very good quality.
VSM::SINC8
15 times slower than BILINEAR, the final result is of excellent quality but may be marginally over-sharpened.
VSM::SPLINE16
About half the speed of BILINEAR, this method produces a considerably better result.
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
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: 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.
+
+
+
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.
Actions
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)