traj_plot_3D: Simple 3D plot of a trajectory

View source: R/traj_plot_3D.R

traj_plot_3DR Documentation

Simple 3D plot of a trajectory

Description

Takes a trajectory with three state variables as produced by integrateODE() and plots out in a 3-dimensional perspective plot, which can be rotated.

Usage

traj_plot_3D(x, y, z, soln, domain = NULL, npts = 1000)

Arguments

x

Name of one of the state variables to be plotted.

y

Similar to x

z

Similar to y and x

soln

Solution output from integrateODE()

domain

Optional list like domain=domain(t=c(0,100)). By default, this will be inferred from soln

npts

Number of points at which to evaluate the solution.

Examples

Lorenz <- makeODE(dx ~ sigma*(y-x), dy ~(x*(rho-z) - y), dz ~ (x*y - beta*z), 
                  rho=28, sigma=10, beta = 8/3)
T1 <- integrateODE(Lorenz, domain(t=0:50), x=-5, y=-7, z=19.4)
traj_plot_3D(x, y, z, T1, npts=5000)

mosaicCalc documentation built on Sept. 11, 2024, 9:10 p.m.