pub enum ProceduralEffect {
None,
JuliaSet,
Mandelbrot,
NewtonBasins,
NovaJulia,
CosmicAurora,
Starfield,
Fractal,
Polynomial,
Random,
}Expand description
Represents all supported procedural background overlay effects.
Variants§
None
No overlay effect is applied; displays the raw, unaltered wallpaper.
JuliaSet
Julia Set fractal overlay.
- Characteristics: Rendered as thin, sharp, self-similar contour lines forming highly symmetrical branching patterns. Depending on the selected complex constant, the lines trace intricate shapes resembling swirling clouds, dendritic lace, spiral galaxy arms, leafy filaments, or crystalline snowflakes.
- Creator: Developed mathematically by the French mathematician Gaston Julia in 1918.
- Generator function: Calculated by mapping the convergence boundary under the recursive function: f(z) = z^2 + c where c is a fixed complex constant perturbation and the initial coordinate z_0 varies across the viewport.
Mandelbrot
Mandelbrot Set fractal overlay.
- Characteristics: Rendered as thin, sharp, self-similar contour lines tracing the boundary of the set. The lines expose highly detailed structural contours, including a main cardioid, circular period bulbs, swirling spiral valleys, and repeating miniature copies of the entire set connected by thin filaments.
- Creator: First visualized and defined by the Polish-born French-American mathematician Benoit Mandelbrot in 1980.
- Generator function: Modeled using the quadratic recurrence equation starting from the origin: z(n+1) = z(n)^2 + c where z_0 = 0 and the complex parameter c varies across the viewport grid coordinates.
NewtonBasins
Newton-Raphson Basin of Attraction fractal overlay.
- Characteristics: Symmetrical, kaleidoscope-like mandala structures representing root-finding convergence fields across complex space boundaries. It maps the limits of convergence zones where points migrate to specific roots of a polynomial equation.
- Creator: Formulated based on Sir Isaac Newton’s root-approximation methods (1690s) and Arthur Cayley’s subsequent complex-plane studies (1879).
- Generator function: Computed using a relaxed Newton-Raphson recurrence formula: z(n+1) = z(n) - lambda * f(z(n)) / f’(z(n)) on the polynomial f(z) = z^p - 1, where p is the integer polynomial power and lambda is a complex relaxation factor.
NovaJulia
Nova Julia liquid fractal overlay.
- Characteristics: Organic, flowing, fluid-like plumes resembling liquid mercury, cosmic nebulae, or dynamic plasma current paths.
- Creator: Developed by Paul Derbyshire in the late 1990s as a structural variation and relaxation of the classic Newton-Raphson fractal.
- Generator function: Evaluated using the relaxed Newton recurrence relation perturbed by a dynamic additive complex value: z(n+1) = z(n) - R * (z(n)^p - 1) / (p * z(n)^(p-1)) + c where p is the polynomial exponent, R is a complex relaxation modifier, and c is a fixed perturbation coordinate.
CosmicAurora
Procedural Cosmic Aurora wave generator.
Generator function: multi-frequency sinusoidal wave composition.
Starfield
Procedural Starfield / Bokeh generator.
Generator function: I(d) = I_0 * exp(-d^2 / (2 * sigma^2)) (Gaussian).
Fractal
Fractal mode selector: randomly chooses between Julia or Mandelbrot.
Polynomial
Fractal mode selector: randomly chooses between Newton or Nova.
Random
Fully randomised mode selector: picks any effect independently per display.
Implementations§
Source§impl ProceduralEffect
impl ProceduralEffect
Sourcepub fn get_name(self) -> &'static str
pub fn get_name(self) -> &'static str
Human-readable display name for diagnostics and terminal output.
Sourcepub fn resolve(self) -> Self
pub fn resolve(self) -> Self
Resolves meta-variants (Fractal, Random) to a single concrete effect.
Concrete variants pass through unchanged so callers can always call
resolve() unconditionally.
Sourcepub fn get_renderer(
self,
monitor: &Monitor,
config: &Config,
) -> WallSwitchResult<Option<Box<dyn ImageEffect>>>
pub fn get_renderer( self, monitor: &Monitor, config: &Config, ) -> WallSwitchResult<Option<Box<dyn ImageEffect>>>
Constructs a heap-allocated, monitor-fitted ImageEffect for this variant.
Returns None for ProceduralEffect::None and the meta-variants
Fractal / Random (callers should call resolve first).
§Errors
Returns a WallSwitchError if the generator initialization fails.
Trait Implementations§
Source§impl Clone for ProceduralEffect
impl Clone for ProceduralEffect
Source§fn clone(&self) -> ProceduralEffect
fn clone(&self) -> ProceduralEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProceduralEffect
Source§impl Debug for ProceduralEffect
impl Debug for ProceduralEffect
Source§impl Default for ProceduralEffect
impl Default for ProceduralEffect
Source§fn default() -> ProceduralEffect
fn default() -> ProceduralEffect
Source§impl<'de> Deserialize<'de> for ProceduralEffect
impl<'de> Deserialize<'de> for ProceduralEffect
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ProceduralEffect
Source§impl PartialEq for ProceduralEffect
impl PartialEq for ProceduralEffect
Source§fn eq(&self, other: &ProceduralEffect) -> bool
fn eq(&self, other: &ProceduralEffect) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ProceduralEffect
impl Serialize for ProceduralEffect
impl StructuralPartialEq for ProceduralEffect
Source§impl ValueEnum for ProceduralEffect
impl ValueEnum for ProceduralEffect
Auto Trait Implementations§
impl Freeze for ProceduralEffect
impl RefUnwindSafe for ProceduralEffect
impl Send for ProceduralEffect
impl Sync for ProceduralEffect
impl Unpin for ProceduralEffect
impl UnsafeUnpin for ProceduralEffect
impl UnwindSafe for ProceduralEffect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().