Skip to content

ParticleFlowStyle

Namespace: ThinkGeo.Core.Styling

How a VectorFieldSource draws as streaming particles. Every property has a working default, so AddParticleFlow(field) alone animates.

public sealed class ParticleFlowStyle

Inheritance object → ParticleFlowStyle

Properties

ParticleCount

How many tracers stream over the whole field at once - not per cell; they are seeded at random and reborn when they age out. Taken between 256 and 1,048,576 and rounded up to a square: 65,536 is 256 × 256.

public int ParticleCount { get; set; }

Property Value

int

SpeedFactor

Animation speed multiplier - 1 is calibrated for a pleasant screen pace, not physical time.

public float SpeedFactor { get; set; }

Property Value

float

ColorStops

The colours, by speed in the field's own units: (0, blue), (10, yellow), (25, red) for metres per second. The stops fix the range - a speed below the first takes the first colour, above the last the last - so a colour means the same speed in every update of the field. Null colours each update over its own range with a built-in blue-to-red ramp. The stops GridFillStyle.ColorStops takes.

public IReadOnlyList<ColorStop> ColorStops { get; set; }

Property Value

IReadOnlyList<ColorStop>

TrailPersistence

How much of the trail is kept each frame, 0.5 to 0.999: the closer to 1, the longer the streak behind each particle - 0.96 keeps a long one, 0.8 a short one.

public float TrailPersistence { get; set; }

Property Value

float

Opacity

Whole-layer opacity, 0 to 1.

public float Opacity { get; set; }

Property Value

float

Constructors

ParticleFlowStyle()

public ParticleFlowStyle()

Methods

GetColor(double, double)

The colour a particle moving at takes: from ParticleFlowStyle.ColorStops; without stops, from the built-in blue-to-red ramp over 0.., the field's own range. What every renderer colours a particle with - and what a legend drawn beside it reads. ParticleFlowStyle.Opacity is not applied.

public GeoColor GetColor(double speed, double fastestSpeed)

Parameters

speed double
The particle's speed, in the field's own units.

fastestSpeed double
The field's fastest speed; used only without stops.

Returns

GeoColor

A(VectorFieldSource)

internal Byte[] A(VectorFieldSource )

Parameters

`` VectorFieldSource

Returns

Byte[]