Skip to main content

wassily_effects/
lib.rs

1//! # Wassily Effects
2//!
3//! Visual effects and procedural textures for generative art applications.
4//! This crate provides advanced visual effects, pattern generation, domain warping,
5//! and sampling algorithms that add sophisticated visual treatments to your artwork.
6//!
7//! ## Key Features
8//!
9//! - **Procedural Textures**: Generate complex textures algorithmically
10//! - **Visual Effects**: Grain, stippling, and surface effects
11//! - **Domain Warping**: Transform coordinate spaces for distortion effects
12//! - **Low-Discrepancy Sampling**: Superior point distribution algorithms
13//! - **Pattern Generation**: Create repeating patterns and fills
14//!
15//! ## Modules
16//!
17//! - **[`textures`]**: Procedural texture generation and pattern creation
18//! - **[`grain`]**: Film grain and noise overlay effects
19//! - **[`stipple`]**: Low-discrepancy sampling and stippling algorithms
20//! - **[`warp`]**: Domain warping and coordinate transformation effects
21//!
22//! ## Quick Start
23//!
24//! ### Adding Grain Effect
25//! ```no_run
26//! use wassily_effects::*;
27//! use wassily_core::*;
28//!
29//! // Create a grain effect
30//! let grain = Grain::new(800, 600, 0.01, 0.5);
31//! let grain_paint = grain.paint();
32//!
33//! // Apply to a canvas
34//! let mut canvas = Canvas::new(800, 600);
35//! canvas.fill_paint(&grain_paint);
36//! ```
37//!
38//! ### Creating Stipple Patterns
39//! ```no_run
40//! use wassily_effects::*;
41//! use wassily_core::*;
42//!
43//! // Generate low-discrepancy point distribution
44//! let points = halton_2d(1000, 800.0, 600.0);
45//!
46//! // Draw stipple pattern
47//! let mut canvas = Canvas::new(800, 600);
48//! for point in points {
49//!     canvas.dot(point.x, point.y, *BLACK);
50//! }
51//! ```
52//!
53//! ### Procedural Textures
54//! ```no_run
55//! use wassily_effects::*;
56//! use wassily_core::*;
57//!
58//! // Create a stipple texture
59//! let texture = stipple_texture(256, 256, *BLACK, 10.0);
60//!
61//! // Use as pattern fill
62//! let pattern_paint = PatternPaint::new(&texture, bbox, 256, 256);
63//! ```
64//!
65//! ## Applications
66//!
67//! - **Artistic Effects**: Film grain, stippling, hatching
68//! - **Texture Generation**: Procedural surface textures
69//! - **Sampling**: Better-than-random point distributions
70//! - **Image Processing**: Domain warping and distortion
71//! - **Pattern Creation**: Repeating patterns and fills
72
73pub mod grain;
74pub mod stipple;
75pub mod textures;
76pub mod warp;
77
78// Re-export key types and functions for convenience
79pub use grain::*;
80pub use stipple::*;
81pub use textures::*;
82pub use warp::*;