Kōtuku
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Config
    • Core
    • Display
    • Document
    • Font
    • HTTP
    • Network
    • Regex
    • SVG
    • Tiri
    • Vector
    • XML
    • XQuery
    • XRandR
      • Audio
      • MP3
      • Sound
      • File
      • MetaClass
      • Module
      • StorageDevice
      • Task
      • Thread
      • Time
      • Compression
      • CompressedStream
      • Config
      • LZMAStream
      • Script
      • Tiri
      • XML
      • XQuery
      • Controller
      • BlurFX
      • ColourFX
      • CompositeFX
      • ConvolveFX
      • DisplacementFX
      • FilterEffect
      • FloodFX
      • ImageFX
      • LightingFX
      • MergeFX
      • MorphologyFX
      • OffsetFX
      • RemapFX
      • SourceFX
      • TurbulenceFX
      • WaveFunctionFX
      • Scintilla
      • Bitmap
      • Clipboard
      • Display
      • Document
      • Font
      • Image
      • Pointer
      • Surface
      • SVG
      • ClientSocket
      • HTTP
      • NetClient
      • NetLookup
      • NetServer
      • NetSocket
      • Proxy
      • Gradient
      • GradientConic
      • GradientContour
      • GradientDiamond
      • GradientDiffusion
      • GradientDistal
      • GradientGouraud
      • GradientLinear
      • GradientMesh
      • GradientRadial
      • GradientVoronoi
      • Vector
      • VectorClip
      • VectorColour
      • VectorEllipse
      • VectorFilter
      • VectorGradient
      • VectorGroup
      • VectorImage
      • VectorPath
      • VectorPattern
      • VectorPolygon
      • VectorRectangle
      • VectorScene
      • VectorShape
      • VectorSpiral
      • VectorText
      • VectorTransition
      • VectorViewport
      • VectorWave
      • Linux Builds
      • Windows Builds
      • Customising Your Build
      • Kōtuku Objects
      • Kōtuku In Depth
      • Kōtuku Design Patterns
      • Coding With AI
      • Regex Manual
      • XML Comparisons
      • Tiri Reference Manual
      • Config API
      • Defer Syntax
      • GUI API
      • HTTP Server API
      • I/O API
      • JSON API
      • OAuth API
      • Options API
      • Proxy Server API
      • Tempus API
      • URL API
      • VFX API
      • Widgets
      • RIPL Reference Manual
      • Origo
      • Flute / Unit Testing
      • Tuku
      • Embedded Document Format
      • TDL Reference Manual
      • TDL Tools
      • Action Reference Manual
      • System Error Codes

GradientVoronoi Class

Seeded Worley/Voronoi field colour gradient paint server.

GradientVoronoi scatters deterministic feature points inside the target path bounds and maps the selected Worley field through the inherited colour ramp. Seed controls repeatability, PointCount controls feature density, WorleyMode selects the field interpretation, and WorleyMetric selects the distance metric.

This gradient operates exclusively in BOUNDING_BOX space. If Gradient⇒Units is set to USERSPACE it will be reset to BOUNDING_BOX during initialisation.

Structure

The GradientVoronoi class consists of the following fields:

Access
NameTypeComment
 FloorDOUBLEColour ramp floor for Voronoi gradients.

The Floor value is used as the floor for Voronoi gradient colour values. It has a valid range of 0 <= Floor < Multiplier; the constraint against Multiplier is enforced at initialisation.

 HeightMaxDOUBLEMaximum seeded feature-point height.

HeightMax defines the upper bound for per-point heights used by the WEIGHTED and PEAKS Worley modes.

 HeightMinDOUBLEMinimum seeded feature-point height.

HeightMin defines the lower bound for per-point heights used by the WEIGHTED and PEAKS Worley modes. When HeightMin and HeightMax match, every feature point has the same height.

 JitterDOUBLENormalised jitter for grid-distributed feature points.

Jitter ranges from 0 to 1. A value of zero uses uniform random placement; values above zero place points on a jittered grid, with larger values allowing greater movement within each grid cell.

 MultiplierDOUBLEColour ramp multiplier for Voronoi gradients.

The Multiplier value acts as a multiplier for Voronoi gradient colour values. It has a valid range of .01 < Multiplier < 10.

 PointCountINTNumber of seeded Voronoi feature points.

PointCount controls how many feature points are generated inside the target path bounds. The accepted range is 1 to 4096 and the default is 16. This field is ignored when explicit Points are supplied.

 Pointskt::vector<VoronoiPoint>User-defined Voronoi feature points.

The Points field accepts a vector of VoronoiPoint structures that define the feature-point coordinates used by the Voronoi field. When at least one point is supplied, the procedural Seed, PointCount, HeightMin, HeightMax and Jitter fields are ignored and the field is generated from the supplied points instead.

Point coordinates are normalised to the target path bounds, with (0, 0) at the top-left of the bounds and (1, 1) at the bottom-right. The Height value is used by the WEIGHTED and PEAKS Worley modes and ignored by the distance only modes.

 SeedINT64Deterministic seed for feature-point generation.

Seed controls the generated feature points and their heights. A value of zero derives a stable seed from the target path fingerprint.

 WorleyMetricWLMDistance metric for the Voronoi field.

WorleyMetric selects the distance function used when measuring each pixel against the seeded feature points.

NameDescription
WLM::CHEBYSHEV
WLM::EUCLIDEAN
WLM::MANHATTAN
 WorleyModeWLFField mode for the Voronoi gradient.

WorleyMode selects how distances to feature points are converted into the scalar field that feeds the colour ramp.

NameDescription
WLF::F1Distance to nearest point.
WLF::F2Distance to second-nearest point.
WLF::F2_F1Distance between the nearest and second-nearest points.
WLF::PEAKSAdditive peaks or terrain using per-point heights.
WLF::WEIGHTEDAdditively-weighted Voronoi using per-point heights.
GradientVoronoi class documentation © Paul Manias © 2010-2026

WLF Type

Worley field modes.

NameDescription
WLF::F1Distance to nearest point.
WLF::F2Distance to second-nearest point.
WLF::F2_F1Distance between the nearest and second-nearest points.
WLF::PEAKSAdditive peaks or terrain using per-point heights.
WLF::WEIGHTEDAdditively-weighted Voronoi using per-point heights.
GradientVoronoi module documentation © Paul Manias © 2010-2026

WLM Type

Worley distance metrics.

NameDescription
WLM::CHEBYSHEV
WLM::EUCLIDEAN
WLM::MANHATTAN
GradientVoronoi module documentation © Paul Manias © 2010-2026

VoronoiPoint Structure

Describes a feature point for the GradientVoronoi Points field.

FieldTypeDescription
XDOUBLEThe X coordinate of the feature point.
YDOUBLEThe Y coordinate of the feature point.
HeightDOUBLEThe per-point height used by WEIGHTED and PEAKS modes.
GradientVoronoi class documentation © Paul Manias © 2010-2026