R/RcppExports.R

Defines functions burning_ship_esc exp_esc cosine_esc fibonacci_esc mandelbrot_esc

Documented in burning_ship_esc cosine_esc exp_esc fibonacci_esc mandelbrot_esc

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @title
#' Mandelbrot escape function
#' @description
#' Compute the Mandelbrot set.
#'
#' @details
#' Computes the iterations required to escape based on
#' \eqn{z_n \leftarrow z_{n-1}^2 + c}
#' given input \eqn{c}.
#'
#' @param x  the real coordinates
#' @param y  the imaginary coordinates
#' @param maxit  the maximum iterations to consider
#' @param escape   the condition to determine escape, in squared distance units.
#' @template etc
#' @name fractals
#' @rdname fractals
#' @export
mandelbrot_esc <- function(x, y, maxit = 128L, escape = 4.0) {
    .Call('_faroutman_mandelbrot_esc', PACKAGE = 'faroutman', x, y, maxit, escape)
}

#' @title
#' Fibonacci escape function
#' @description
#' Compute the Fibonacci set.
#'
#' @details
#' Computes the iterations required to escape based on
#' \eqn{z_n \leftarrow z_{n-1}^2 + z_{n-2} + c}
#' given input \eqn{c}.
#'
#' @seealso \url{https://math.stackexchange.com/a/5705}
#'
#' @param x  the real coordinates
#' @param y  the imaginary coordinates
#' @param maxit  the maximum iterations to consider
#' @param escape   the condition to determine escape, in squared distance units.
#' @template etc
#' @name fractals
#' @rdname fractals
#' @export
fibonacci_esc <- function(x, y, maxit = 128L, escape = 4.0) {
    .Call('_faroutman_fibonacci_esc', PACKAGE = 'faroutman', x, y, maxit, escape)
}

#' @title
#' Cosine escape function
#' @description
#' Compute the Cosine set.
#'
#' @details
#' Computes the iterations required to escape based on
#' \eqn{z_n \leftarrow cos(z_{n-1}) + c}
#' given input \eqn{c}.
#'
#' @param x  the real coordinates
#' @param y  the imaginary coordinates
#' @param maxit  the maximum iterations to consider
#' @param escape   the condition to determine escape, in squared distance units.
#' @template etc
#' @name fractals
#' @rdname fractals
#' @export
cosine_esc <- function(x, y, maxit = 128L, escape = 987.0) {
    .Call('_faroutman_cosine_esc', PACKAGE = 'faroutman', x, y, maxit, escape)
}

#' @title
#' Exp escape function
#' @description
#' Compute the Exp set.
#'
#' @details
#' Computes the iterations required to escape based on
#' \eqn{z_n \leftarrow exp(z_{n-1}) + c}
#' given input \eqn{c}.
#'
#' @param x  the real coordinates
#' @param y  the imaginary coordinates
#' @param maxit  the maximum iterations to consider
#' @param escape   the condition to determine escape, in squared distance units.
#' @template etc
#' @name fractals
#' @rdname fractals
#' @export
exp_esc <- function(x, y, maxit = 128L, escape = 2500.0) {
    .Call('_faroutman_exp_esc', PACKAGE = 'faroutman', x, y, maxit, escape)
}

#' @title
#' Burning ship escape function
#' @description
#' Compute the Burning Ship fractal set.
#'
#' @details
#' Computes the iterations required to escape based on
#' \eqn{z_n \leftarrow \left(|Re(z_{n-1})| + i |Im(z_{n-1})|\right)^2 + c}
#' given input \eqn{c}.
#'
#' @param x  the real coordinates
#' @param y  the imaginary coordinates
#' @param maxit  the maximum iterations to consider
#' @param escape   the condition to determine escape, in squared distance units.
#' @template etc
#' @name fractals
#' @rdname fractals
#' @export
#' @references 
#' Wikipedia contributors, "Burning Ship fractal," Wikipedia, The Free Encyclopedia, 
#' \url{https://en.wikipedia.org/w/index.php?title=Burning_Ship_fractal&oldid=1145232996}
#' (accessed March 27, 2023).
burning_ship_esc <- function(x, y, maxit = 128L, escape = 4.0) {
    .Call('_faroutman_burning_ship_esc', PACKAGE = 'faroutman', x, y, maxit, escape)
}
shabbychef/faroutman documentation built on March 28, 2023, 10:42 p.m.