Learn R Programming

vectorialcalculus (version 1.0.5)

curve_sample3d: Sample a 3D parametric curve

Description

Generates a tibble with columns t, x, y, z by evaluating the parametric curve \((X(t), Y(t), Z(t))\) on the interval \([a, b]\) at a given number of sample points.

Usage

curve_sample3d(X, Y, Z, a, b, n_samples = 400)

Value

A tibble with columns t, x, y, z, where x = X(t), y = Y(t), z = Z(t).

Arguments

X, Y, Z

Functions of one variable t, e.g. function(t) 2 * cos(t).

a, b

Numeric parameter limits for t.

n_samples

Integer. Number of sample points along the curve.

See Also

plot_curve3d(), arc_length3d()

Examples

Run this code
X <- function(t) 2 * cos(t)
Y <- function(t) 3 * sin(t)
Z <- function(t) t / 5
curve_sample3d(X, Y, Z, 0, 2 * pi, n_samples = 100)

Run the code above in your browser using DataLab