[][src]Struct julia_set::Params

pub struct Params { /* fields omitted */ }

Julia set rendering parameters.

The parameters are:

  • Image dimensions (in pixels)
  • View dimensions and view center determining the rendered area. (Only the view height is specified explicitly; the width is inferred from the height and the image dimension ratio.)
  • Infinity distance
  • Upper bound on the iteration count

See the Julia set theory for more details regarding these parameters.

Implementations

impl Params[src]

pub fn new(image_dimensions: [u32; 2], view_height: f32) -> Self[src]

Creates a new set of params with the specified image_dimensions and the view_height of the rendered area.

The remaining parameters are set as follows:

  • The width of the rendered area is inferred from these params.
  • The view is centered at 0.
  • The infinity distance is set at 3.

Panics

Panics if any of the following conditions do not hold:

  • image_dimensions are positive
  • view_height is positive

pub fn with_view_center(mut self: Self, view_center: [f32; 2]) -> Self[src]

Sets the view center.

pub fn with_infinity_distance(mut self: Self, inf_distance: f32) -> Self[src]

Sets the infinity distance.

Panics

Panics if the provided distance is not positive.

pub fn with_max_iterations(mut self: Self, max_iterations: u8) -> Self[src]

Sets the maximum iteration count.

Panics

Panics if max_iterations is zero.

Trait Implementations

impl Clone for Params[src]

impl Debug for Params[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Content for T[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.