pub struct GrayScott {
pub u: Vec<f64>,
pub v: Vec<f64>,
pub width: usize,
pub height: usize,
pub feed: f64,
pub kill: f64,
pub du: f64,
pub dv: f64,
}Expand description
Gray-Scott reaction-diffusion system. Models Turing pattern formation.
Fields§
§u: Vec<f64>§v: Vec<f64>§width: usize§height: usize§feed: f64§kill: f64§du: f64§dv: f64Implementations§
Source§impl GrayScott
impl GrayScott
pub fn new(width: usize, height: usize, feed: f64, kill: f64) -> Self
pub fn seed_center(&mut self)
pub fn step(&mut self, dt: f64)
Sourcepub fn preset_mitosis(width: usize, height: usize) -> Self
pub fn preset_mitosis(width: usize, height: usize) -> Self
Preset: mitosis (f=0.0367, k=0.0649)
Sourcepub fn preset_coral(width: usize, height: usize) -> Self
pub fn preset_coral(width: usize, height: usize) -> Self
Preset: coral (f=0.0545, k=0.062)
Sourcepub fn preset_worms(width: usize, height: usize) -> Self
pub fn preset_worms(width: usize, height: usize) -> Self
Preset: worms (f=0.078, k=0.061)
Sourcepub fn preset_maze(width: usize, height: usize) -> Self
pub fn preset_maze(width: usize, height: usize) -> Self
Preset: maze (f=0.029, k=0.057)
Sourcepub fn preset_solitons(width: usize, height: usize) -> Self
pub fn preset_solitons(width: usize, height: usize) -> Self
Preset: solitons (f=0.03, k=0.06)
Sourcepub fn preset_unstable(width: usize, height: usize) -> Self
pub fn preset_unstable(width: usize, height: usize) -> Self
Preset: unstable (f=0.02, k=0.055)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GrayScott
impl RefUnwindSafe for GrayScott
impl Send for GrayScott
impl Sync for GrayScott
impl Unpin for GrayScott
impl UnsafeUnpin for GrayScott
impl UnwindSafe for GrayScott
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.