Project ↗ | Documentation ↗ | — | Tutorials ↗ | How To's ↗ | Explanations ↗ | References |
Entry ↗ | — | Sections ↘ | Permuted Sections ↘ | Names ↘ | Permuted Names ↘ | Strict ↘ | Implementations ↘ |
Documentation -- Reference Pages -- generator virtual warp
Table Of Contents
Operators
- aktive transform affine
- aktive transform compose
- aktive transform compose-core
- aktive transform domain
- aktive transform identity
- aktive transform invert
- aktive transform point
- aktive transform points
- aktive transform projective
- aktive transform quad 2quad
- aktive transform quad unit2
- aktive transform reflect line
- aktive transform reflect x
- aktive transform reflect y
- aktive transform rotate
- aktive transform scale
- aktive transform shear
- aktive transform translate
- aktive warp 2cartesian
- aktive warp 2polar
- aktive warp matrix
- aktive warp noise gauss
- aktive warp noise uniform
- aktive warp swirl
- aktive warp wobble
Operators
↑ aktive transform affine
Syntax: aktive transform affine (param value)... [→ definition]
Returns a single-band 3x3 image holding the affine transformation specifed by the 6 parameters a to f.
The result is suitable for use with aktive warp matrix
Parameter | Type | Default | Description |
---|---|---|---|
a | double | Parameter a of the affine transform | |
b | double | Parameter b of the affine transform | |
c | double | Parameter c of the affine transform | |
d | double | Parameter d of the affine transform | |
e | double | Parameter e of the affine transform | |
f | double | Parameter f of the affine transform |
Examples
aktive transform affine a 1 b 2 c 3 d 4 e 5 f 6
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
↑ aktive transform compose
Syntax: aktive transform compose srcs... [→ definition]
Takes any number of 3x3 projective transformation matrices and returns their composition.
The result is suitable for use with aktive warp matrix
A single matrix is passed through unchanged. And not materialized either.
This operator is strict in all inputs. All projective matrices are materialized and immediately used to compute the composition.
Input | Description |
---|---|
args... | Source images |
Examples
@1
(translate x -5 y -6) |
@2
(rotate by 45) |
@3
(translate x 5 y 6) |
aktive transform compose @1 @2 @3
(rotate 45 around (5,6)) | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
↑ aktive transform compose-core
Syntax: aktive transform compose-core src0 src1 [→ definition]
Takes two 3x3 projective transformation matrices and returns their composition.
The result is suitable for use with aktive warp matrix
This operator is strict in both inputs. The two projective matrices are materialized and immediately used to compute the composition A*B.
Input | Description |
---|---|
src0 | |
src1 |
Examples
@1
(rotate) |
@2
(translate) |
aktive transform compose-core @1 @2
(rotate after translate) | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
@1
(rotate) |
@2
(translate) |
aktive transform compose-core @1 @2
(translate after rotate) | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
↑ aktive transform domain
Syntax: aktive transform domain src0 src1 [→ definition]
Returns the domain generated by applying the transformation (src0
) to the domain of the image (src1
). The domain is returned in the same form at as generated by aktive query domain, i.e. a 4-element Tcl list in the format {x y w h}.
Fractions are rounded to integers such that the actual domain is kept enclosed.
This operator is strict in the 1st input. The projective matrix is materialized for the calculation of the domain.
Input | Description |
---|---|
src0 | |
src1 |
Examples
@1
|
@2
(rotate by 30) |
aktive transform domain @2 @1
| |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() geometry(0 0 380 250 3) |
|
-124 0 454 407 |
↑ aktive transform identity
Syntax: aktive transform identity [→ definition]
Returns a single-band 3x3 image containing the identity transform.
The result is suitable for use with aktive warp matrix
Examples
aktive transform identity
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
↑ aktive transform invert
Syntax: aktive transform invert src [→ definition]
Takes a single 3x3 projective transformation matrix and returns the matrix of the inverted transformation. This is used to turn forward into backward transformations, and vice versa.
The result is suitable for use with aktive warp matrix
This operator is strict in the 1st input. The projective matrix is materialized and immediately used to compute the inversion.
Input | Description |
---|---|
src | Source image |
Examples
@1
(translate x -5 y -6) |
aktive transform invert @1
| ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@1
(translate x -5 y -6) |
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
↑ aktive transform point
Syntax: aktive transform point src (param value)... [→ definition]
Returns the point generated by the application of the transformation to the input point.
Input | Description |
---|---|
src | Source image |
Parameter | Type | Default | Description |
---|---|---|---|
at | point | Point to transform. |
Examples
@1
|
@2
(at 0 0) |
@3
(at 0 1) |
@4
(at 1 1) |
aktive transform point @1 at {1 0}
(at 1 0) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
1.0 2.0 | 2.0 7.0 | 7.0 6.0 | 6.0 1.0 |
@1
|
@2
(at 1 2 => 0 3) |
@3
(at 6 1 => 7 1) |
@4
(at 7 6 => 8 7) |
aktive transform point @1 at {2 7}
(at 2 7 => 1 7) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
0.0 3.0000000000000004 | 7.000000000000001 1.0000000000000004 | 8.000000000000002 7.000000000000002 | 1.0000000000000004 7.000000000000002 |
↑ aktive transform points
Syntax: aktive transform points src (param value)... [→ definition]
Returns the list of points generated by the application of the transformation to the input points.
Input | Description |
---|---|
src | Source image |
Parameter | Type | Default | Description |
---|---|---|---|
series | point... | Points to transform. |
Examples
@1
|
aktive transform points @1 series {0 0} {0 1} {1 1} {1 0}
| |||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
{1.0 2.0} {2.0 7.0} {7.0 6.0} {6.0 1.0} |
@1
|
aktive transform points @1 series {1 2} {6 1} {7 6} {2 7}
| |||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
{0.0 3.0000000000000004} {7.000000000000001 1.0000000000000004} {8.000000000000002 7.000000000000002} {1.0000000000000004 7.000000000000002} |
↑ aktive transform projective
Syntax: aktive transform projective (param value)... [→ definition]
Returns a single-band 3x3 image holding the projective transformation specifed by the 8 parameters a to h.
The result is suitable for use with aktive warp matrix
Parameter | Type | Default | Description |
---|---|---|---|
a | double | Parameter a of the projective transform | |
b | double | Parameter b of the projective transform | |
c | double | Parameter c of the projective transform | |
d | double | Parameter d of the projective transform | |
e | double | Parameter e of the projective transform | |
f | double | Parameter f of the projective transform | |
g | double | Parameter g of the projective transform | |
h | double | Parameter h of the projective transform |
Examples
aktive transform projective a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
↑ aktive transform quad 2quad
Syntax: aktive transform quad 2quad (param value)... [→ definition]
Returns a single-band 3x3 image transforming the specified quadrilateral A to the second quadrilateral B.
The result is suitable for use with aktive warp matrix
The quadrilaterals are specified as 4 points A-B-C-D and E-F-G-H in counter clockwise order. The returned transform maps A to E and then the other points in counter clockwise order.
It is implemented by chaining a regular and an inverted aktive transform quad unit2 to transform A-B-C-D to a unit square and from there then to E-F-G-H.
Parameter | Type | Default | Description |
---|---|---|---|
a | point | Point A of the quadrilateral A | |
b | point | Point B of the quadrilateral A | |
c | point | Point C of the quadrilateral A | |
d | point | Point D of the quadrilateral A | |
e | point | Point A of the quadrilateral B | |
f | point | Point B of the quadrilateral B | |
g | point | Point C of the quadrilateral B | |
h | point | Point D of the quadrilateral B |
Examples
aktive transform quad 2quad a {1 2} b {6 1} c {7 6} d {2 7} e {0 3} f {7 1} g {8 7} h {1 7}
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
|
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
@1
|
@2
(at 1 2 => 0 3) |
@3
(at 6 1 => 7 1) |
@4
(at 7 6 => 8 7) |
aktive transform point @1 at {2 7}
(at 2 7 => 1 7) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
0.0 3.0000000000000004 | 7.000000000000001 1.0000000000000004 | 8.000000000000002 7.000000000000002 | 1.0000000000000004 7.000000000000002 |
@1
|
@2
|
@3
(at 0 3 => 1 2) |
@4
(at 7 1 => 6 1) |
@5
(at 8 7 => 7 6) |
aktive transform point @2 at {1 7}
(at 1 7 => 2 7) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
1.0 1.9999999999999996 | 6.0 0.9999999999999994 | 6.999999999999999 5.999999999999999 | 1.9999999999999998 6.999999999999999 |
@1
(quadrilateral) |
@2
( 47 62 => 0 0) |
@3
(100 125 => 0 100) |
@4
(210 80 => 100 100) |
aktive transform point @1 at {190 10}
(190 10 => 100 0) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
-3.1086244689504383e-15 0.0 | -3.994220974639806e-15 100.00000000000001 | 99.99999999999999 100.00000000000001 | 99.99999999999999 0.0 |
@1
(quadrilateral) |
@2
(inverted) |
@3
( 0 0 => 47 62) |
@4
( 0 100 => 100 125) |
@5
(100 100 => 210 80) |
aktive transform point @2 at {100 0}
(100 0 => 190 10) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
47.00000000000001 61.99999999999999 | 100.0 125.0 | 210.00000000000003 80.0 | 190.0 10.0 |
↑ aktive transform quad unit2
Syntax: aktive transform quad unit2 (param value)... [→ definition]
Returns a single-band 3x3 image transforming the unit square to the specified quadrilateral.
The result is suitable for use with aktive warp matrix
The quadrilateral is specified as 4 points A-B-C-D in counter clockwise order. The returned transform maps the origin of the unit square to A and then the other points in counter clockwise order.
To map between two arbitrary quadrilaterals A and B a composition of two transforms is necessary and sufficient, i.e. mapping A to the unit square (as inversion of the map from unit square to A), followed by mapping the unit square to B. This is what aktive transform quad 2quad does.
Parameter | Type | Default | Description |
---|---|---|---|
a | point | Point A of the quadrilateral | |
b | point | Point B of the quadrilateral | |
c | point | Point C of the quadrilateral | |
d | point | Point D of the quadrilateral |
Examples
aktive transform quad unit2 a {1 2} b {6 1} c {7 6} d {2 7}
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
|
@2
(at 0 0) |
@3
(at 0 1) |
@4
(at 1 1) |
aktive transform point @1 at {1 0}
(at 1 0) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
1.0 2.0 | 2.0 7.0 | 7.0 6.0 | 6.0 1.0 |
@1
|
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
References
https://raw.githubusercontent.com/JohnHardy/wiituio/refs/heads/master/WiiTUIO/WiiProvider/Warper.cs
http://www.decew.net/OSS/References/Quadrilateral%20mapping.pdf
↑ aktive transform reflect line
Syntax: aktive transform reflect line ?(param value)...? [→ definition]
Returns a single-band 3x3 image specifying a reflection along either the line through point A and the origin, or the line through points A and B.
The result is suitable for use with aktive warp matrix
Parameter | Type | Default | Description |
---|---|---|---|
a | point | Point A of the line to reflect over | |
b | point | {} | Point B of the line to reflect over. If not specified, the origin is used |
Examples
aktive transform reflect line a {5 3}
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
(reflect line 0--A) |
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
aktive transform reflect line a {5 3} b {-2 -2}
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
(reflect line A--B) |
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
↑ aktive transform reflect x
Syntax: aktive transform reflect x [→ definition]
Returns a single-band 3x3 image specifying a reflection along the x-axis.
The result is suitable for use with aktive warp matrix
When not used as part of a chain of transformations then this is better done using aktive op flip x
Examples
aktive transform reflect x
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
(reflect x) |
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
↑ aktive transform reflect y
Syntax: aktive transform reflect y [→ definition]
Returns a single-band 3x3 image specifying a reflection along the y-axis.
The result is suitable for use with aktive warp matrix
When not used as part of a chain of transformations then this is better done using aktive op flip y
Examples
aktive transform reflect y
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
(reflect y) |
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
↑ aktive transform rotate
Syntax: aktive transform rotate ?(param value)...? [→ definition]
Returns a single-band 3x3 image specifying a rotation around the coordinate origin, by the given angle (in degrees).
The result is suitable for use with aktive warp matrix
Parameter | Type | Default | Description |
---|---|---|---|
by | double | In degrees, angle to rotate | |
around | point | {} | Rotation center. Default is the origin |
Examples
aktive transform rotate by 45
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
(rotate by 45) |
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
↑ aktive transform scale
Syntax: aktive transform scale ?(param value)...? [→ definition]
Returns a single-band 3x3 image specifying a scaling by x- and y factors.
The result is suitable for use with aktive warp matrix
Parameter | Type | Default | Description |
---|---|---|---|
x | double | 1 | Scaling factor for x-axis |
y | double | 1 | Scaling factor for y-axis |
Examples
aktive transform scale x 3 y 0.5
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
(scale x 3 y 1/2) |
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
↑ aktive transform shear
Syntax: aktive transform shear ?(param value)...? [→ definition]
Returns a single-band 3x3 image specifying a shearing along the axes. When both X and Y angles are specified the result will shear X first, then shear Y.
Beware that angles at +/- 90 degrees are poles of infinity.
The result is suitable for use with aktive warp matrix
Parameter | Type | Default | Description |
---|---|---|---|
x | double | 0 | Angle for shearing away from the x-axis. Beware that +/- 90 degrees are poles of infinity. |
y | double | 0 | Angle for shearing away from the y-axis. Beware that +/- 90 degrees are poles of infinity. |
Examples
aktive transform shear x 10
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
aktive transform shear y 10
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
aktive transform shear x 5 y 3
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
(shear x 5 y 3) |
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
↑ aktive transform translate
Syntax: aktive transform translate ?(param value)...? [→ definition]
Returns a single-band 3x3 image specifying a translation by x- and y offsets.
The result is suitable for use with aktive warp matrix
Parameter | Type | Default | Description |
---|---|---|---|
x | double | 0 | Translation offset for x-axis |
y | double | 0 | Translation offset for y-axis |
Examples
aktive transform translate x 3 y 1
| |||||||||
---|---|---|---|---|---|---|---|---|---|
|
@1
(translate x 3 y 1) |
@2
(invert) |
aktive transform compose @1 @2
| |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
↑ aktive warp 2cartesian
Syntax: aktive warp 2cartesian (param value)... [→ definition]
Returns the origin map for a transformation to cartesian from a polar around the image center.
The inverse transformation is created by aktive warp 2polar.
Inspired by http://libvips.blogspot.com/2015/11/fancy-transforms.html
The result is designed to be usable with aktive op warp bicubic and its relatives.
At the technical level the result is a 2-band image where each pixel declares its origin position.
Parameter | Type | Default | Description |
---|---|---|---|
width | uint | Width of the returned image | |
height | uint | Height of the returned image |
Examples
aktive warp 2cartesian width 11 height 11
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
References
↑ aktive warp 2polar
Syntax: aktive warp 2polar (param value)... [→ definition]
Returns the origin map for a transformation to polar around the image center.
The inverse transformation is created by aktive warp 2cartesian.
Inspired by http://libvips.blogspot.com/2015/11/fancy-transforms.html
The result is designed to be usable with aktive op warp bicubic and its relatives.
At the technical level the result is a 2-band image where each pixel declares its origin position.
Parameter | Type | Default | Description |
---|---|---|---|
width | uint | Width of the returned image | |
height | uint | Height of the returned image |
Examples
aktive warp 2polar width 11 height 11
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
References
↑ aktive warp matrix
Syntax: aktive warp matrix transform ?(param value)...? [→ definition]
Returns the origin map for the projective transformation specified by the 3x3x1 matrix (src
) applied to an image of the given geometry and location.
Attention. As a origin map declares origin positions for output pixels the matrix has to specify a backward transformation.
The operations aktive transform affine, aktive transform identity, aktive transform projective, aktive transform quad 2quad, aktive transform quad unit2, aktive transform reflect line, aktive transform reflect x, aktive transform reflect y, aktive transform rotate, aktive transform scale, aktive transform shear, and aktive transform translate all create matrices suitable as input to this operation.
The operations aktive transform compose and aktive transform invert enable the composition of arbitrary transformations from simpler pieces, and the conversion between forward and backward transformations.
The result is designed to be usable with the aktive op warp bicubic operation and its relatives.
At the technical level the result is a 2-band image where each pixel declares its origin position.
This operator is strict in the 1st input. The projective matrix is materialized and cached.
Input | Description |
---|---|
transform | Matrix of an affine transform. |
Parameter | Type | Default | Description |
---|---|---|---|
width | uint | Width of the returned image | |
height | uint | Height of the returned image | |
x | int | 0 | X location of the returned image in the 2D plane |
y | int | 0 | Y location of the returned image in the 2D plane |
Examples
@1
(translate x 5 y 3) |
aktive warp matrix @1 width 5 height 5
| ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@1
(shear x 5) |
aktive warp matrix @1 width 5 height 5
| ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
↑ aktive warp noise gauss
Syntax: aktive warp noise gauss ?(param value)...? [→ definition]
Returns a origin map derived from the identity map by application of gaussian noise as displacement values.
The result is designed to be usable with the aktive op warp bicubic operation and its relatives.
At the technical level the result is a 2-band image where each pixel declares its origin position.
Parameter | Type | Default | Description |
---|---|---|---|
width | uint | Width of the returned image | |
height | uint | Height of the returned image | |
x | int | 0 | X location of the returned image in the 2D plane |
y | int | 0 | Y location of the returned image in the 2D plane |
seed | uint | [expr {int(4294967296*rand())}] | Randomizer seed. Needed only to force fixed results. |
mean | double | 0 | Mean of the desired gauss distribution. |
sigma | double | 1 | Sigma of the desired gauss distribution. |
Examples
aktive warp noise gauss width 5 height 5 seed 703011174
| |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
↑ aktive warp noise uniform
Syntax: aktive warp noise uniform ?(param value)...? [→ definition]
Returns a origin map derived from the identity map by application of uniform noise as displacement values
The result is designed to be usable with the aktive op warp bicubic operation and its relatives.
At the technical level the result is a 2-band image where each pixel declares its origin position.
Parameter | Type | Default | Description |
---|---|---|---|
width | uint | Width of the returned image | |
height | uint | Height of the returned image | |
x | int | 0 | X location of the returned image in the 2D plane |
y | int | 0 | Y location of the returned image in the 2D plane |
seed | uint | [expr {int(4294967296*rand())}] | Randomizer seed. Needed only to force fixed results. |
min | double | 0 | Minimal noise value |
max | double | 1 | Maximal noise value |
Examples
aktive warp noise uniform width 5 height 5 seed 703011174
| |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
↑ aktive warp swirl
Syntax: aktive warp swirl ?(param value)...? [→ definition]
Returns the origin map for a swirl effect around the specified center, with fixed rotation phi, a base rotation from, and a decay factor.
The rotation angle added to a pixel is given by phi + from * exp(-radius * decay)
, where radius is the distance of the pixel from the center. A large decay reduces the swirl at shorter radii. A decay of zero disables the decay.
All parameters except for the center are optional.
The result is designed to be usable with the aktive op warp bicubic operation and its relatives.
At the technical level the result is a 2-band image where each pixel declares its origin position.
Parameter | Type | Default | Description |
---|---|---|---|
width | uint | Width of the returned image | |
height | uint | Height of the returned image | |
x | int | 0 | X location of the returned image in the 2D plane |
y | int | 0 | Y location of the returned image in the 2D plane |
center | point | Center of the swirl | |
phi | double | 0 | In degrees, fixed rotation to apply. |
from | double | 45 | In degrees, swirl rotation at distance 0 from center. |
decay | double | 0.1 | Rotation decay with distance from center. |
Examples
aktive warp swirl width 11 height 11 center {5 5} decay 1
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
References
↑ aktive warp wobble
Syntax: aktive warp wobble ?(param value)...? [→ definition]
Returns the origin map for a wobble effect around the specified center, with base amplitude, frequency, chirp, and attenuation powers.
Inspired by http://libvips.blogspot.com/2015/11/fancy-transforms.html
The result is designed to be usable with the aktive op warp bicubic operation and its relatives.
At the technical level the result is a 2-band image where each pixel declares its origin position.
The effect modulates the distance from the center based on the formula sin (radius^chirp * frequency) * amplitude / (1+radius)^attenuation
, where radius
is the original distance.
All parameters, including the center are optional.
Parameter | Type | Default | Description |
---|---|---|---|
width | uint | Width of the returned image | |
height | uint | Height of the returned image | |
center | point | {} | Center of the wobble, relative to the origin. Defaults to the image center. |
amplitude | double | 500 | Base amplitude of the displacement. |
frequency | double | 2 | Base wave frequency. |
chirp | double | 0.5 | Chirp (power) factor modulating the frequency. |
attenuation | double | 0.6 | Power factor tweaking the base 1/x attenuation. |
Examples
aktive warp wobble width 11 height 11
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|