Siticone Fluid Canvas
The SiticoneFluidCanvas is a high-performance, GPU-accelerated visualization control designed to render complex particle systems,
fluid simulations, and interactive backgrounds. It simulates physics properties like gravity, viscosity, and turbulence to create organic,
flowing visuals suitable for modern dashboard backgrounds, splash screens, or interactive data visualizations.
Visualization Styles
Control the fundamental visual behavior of the particle system.
| Property | Type | Description |
|---|---|---|
VisualizationStyle |
Enum |
Determines the rendering mode:
|
AnimationPreset |
Enum |
Pre-configured physics sets:
Calm, Energetic, Chaotic, Rhythmic, Breathing, Flowing.
|
ColorBlendMode |
Enum | Controls how overlapping particles mix colors (e.g., Additive for glowing lights, Multiply for ink effects). |
Physics & Particles
Fine-tune the simulation engine to create everything from thick oil to airy smoke.
| Property | Type | Description & Usage Example |
|---|---|---|
Gravity |
PointF | fluid.Gravity = new PointF(0, 9.8f); Constant force applied to all particles. X=Horizontal, Y=Vertical. |
Viscosity |
float | fluid.Viscosity = 0.05f; Resistance to flow. Higher values make the fluid appear thicker (like honey). |
Turbulence |
float | fluid.Turbulence = 0.2f; Amount of random chaotic movement added to particles. |
MaxParticles |
int | fluid.MaxParticles = 500; Limit on active particles. Higher values look better but cost CPU/GPU. |
EmissionRate |
float | fluid.EmissionRate = 20f; Number of new particles spawned per second. |
User Interaction
Configure how the fluid reacts to the mouse cursor.
| Property | Type | Description & Usage Example |
|---|---|---|
EnableMouseInteraction |
bool | fluid.EnableMouseInteraction = true; |
InteractionMode |
Enum |
Defines the force applied by the cursor:
|
InteractionRadius |
float | fluid.InteractionRadius = 100f; Distance in pixels where the mouse force is effective. |
InteractionStrength |
float | fluid.InteractionStrength = 50f; Magnitude of the force applied. |
Methods
Programmatic control to trigger effects or modify the simulation.
// Triggers a particle burst at a specific location.
// Useful for click feedback or game effects.
var center = new PointF(this.Width / 2, this.Height / 2);
fluidCanvas1.CreateExplosion(center, 150.0f);
// Adds a persistent force field to the simulation.
// Example: A black hole in the center of the screen.
fluidCanvas1.AddForceField(
new PointF(100, 100),
FluidInteractionMode.Attract,
80.0f, // Strength
200.0f // Radius
);
// Instantly removes all active particles and ripples.
fluidCanvas1.ClearAllParticles();
Events
| Event | Description |
|---|---|
FluidInteraction |
Fired when the user interacts with the fluid (mouse move/click). Contains data about position and affected particles. |
ParticleCreated |
Fired when a new particle spawns. Useful for syncing external audio/visuals. |
RippleCreated |
Fired when a ripple effect is triggered. |
Detailed Usage Examples
Example 1: Interactive Background
Setup for a login screen background with a calming "Nebula" effect that reacts to the mouse.
public void SetupLoginBackground()
{
fluidCanvas1.Dock = DockStyle.Fill;
// Style
fluidCanvas1.VisualizationStyle = FluidVisualizationStyle.Nebula;
fluidCanvas1.AnimationPreset = FluidAnimationPreset.Breathing;
// Colors
fluidCanvas1.PrimaryFluidColor = Color.FromArgb(100, 100, 200, 255); // Transparent Blue
fluidCanvas1.SecondaryFluidColor = Color.FromArgb(80, 200, 100, 255); // Purple tint
fluidCanvas1.BackgroundGradientStart = Color.FromArgb(10, 10, 30);
fluidCanvas1.BackgroundGradientEnd = Color.Black;
// Interaction
fluidCanvas1.EnableMouseInteraction = true;
fluidCanvas1.InteractionMode = FluidInteractionMode.Repel; // Push smoke away
fluidCanvas1.InteractionRadius = 150f;
// Physics
fluidCanvas1.Viscosity = 0.05f; // Slower movement
fluidCanvas1.EnableGlow = true;
}
Example 2: Electric Storm Effect
Creates a high-energy "Electric" visualization with rapid movement and additive color blending.
private void ActivateStormMode()
{
fluidCanvas1.VisualizationStyle = FluidVisualizationStyle.Electric;
fluidCanvas1.ColorBlendMode = FluidColorBlendMode.Additive;
// High Energy Settings
fluidCanvas1.MaxParticles = 400;
fluidCanvas1.ParticleSpeed = 100f;
fluidCanvas1.Turbulence = 0.5f;
fluidCanvas1.TrailLength = 15;
// Interaction
fluidCanvas1.InteractionMode = FluidInteractionMode.Attract;
fluidCanvas1.InteractionStrength = 200f;
// Colors
fluidCanvas1.PrimaryFluidColor = Color.Cyan;
fluidCanvas1.SecondaryFluidColor = Color.White;
}
Example 3: Dynamic Interaction Handling
Using the FluidInteraction event to trigger sound effects or UI changes.
private void fluidCanvas1_FluidInteraction(object sender, FluidInteractionEventArgs e)
{
// Only trigger if particles were actually affected
if (e.AffectedParticles > 5)
{
// Example: Play a sound based on interaction intensity
if (e.InteractionType == FluidInteractionMode.Ripple)
{
SoundPlayer player = new SoundPlayer("splash.wav");
player.Play();
}
Console.WriteLine($"Interaction at {e.Position} hit {e.AffectedParticles} particles.");
}
}
Example 4: Performance Optimization
Automatically adjusting quality settings for lower-end devices.
public void OptimizeForLowSpec()
{
// Enable the built-in performance mode
fluidCanvas1.EnablePerformanceMode = true;
// Manual overrides for maximum FPS
fluidCanvas1.MaxParticles = 100; // Limit count
fluidCanvas1.EnableGlow = false; // Disable expensive glow
fluidCanvas1.EnableParticleTrails = false; // Disable trail rendering
fluidCanvas1.RenderQuality = 1; // Low quality (High performance)
fluidCanvas1.FrameRate = 30; // Cap at 30 FPS
}