Learn R Programming

mathart (version 0.0.0.9000)

lorenz_attractor: Lorenz attractor

Description

Generates data for plotting a Lorenz attractor and stores it in a data frame. The Rcpp implementation is from the blog post Drawing 10 Million Points With ggplot by Antonio Sanchez Chinchon.

Usage

lorenz_attractor(
  a = 2,
  b = 0.7,
  c = 26,
  x0 = -1,
  y0 = 1,
  z0 = -1,
  dt = 0.01,
  n = 10000
)

Arguments

a, b, c

Parameters

x0, y0, z0

Initial point coordinates

dt

Time step

n

Number of points to generate

Examples

Run this code
# NOT RUN {
lorenz_attractor()
# }

Run the code above in your browser using DataLab