View source: R/vector_fields.R
| vc_streamline | R Documentation |
Trace a spatial field trajectory with fixed-step RK4
vc_streamline(f, seed, interval, n = 100L, time_dependent = FALSE)
f |
Function of one Cartesian vector, or of a vector and time when time_dependent is TRUE. Returns three finite Cartesian components. |
seed |
Initial Cartesian position at the first endpoint. |
interval |
Two finite times in traversal order. |
n |
Number of steps, at least one. |
time_dependent |
Use the signature f(position,time) for a pathline. |
Autonomous fields give streamlines. Reversed times integrate backward. Equal endpoints give one sample. The method uses the supplied field as velocity and has no adaptive error estimate or boundary events. The visualization sampling domain does not clip the trajectory.
List with type streamline3d, samples t,x,y,z,speed and field mode.
vc_streamline(function(p)c(-p[2],p[1],0),c(1,0,0),c(0,pi/2))$samples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.