# Example curve
X <- function(t) t^2 * cos(t)
Y <- function(t) t^3 * sin(3 * t)
Z <- function(t) t
res <- curvature_torsion3d(X, Y, Z, t0 = pi)
res$kappa
res$tau
# \donttest{ if (requireNamespace("plotly", quietly = TRUE)) {
# curvature_torsion3d(
# X, Y, Z, t0 = pi, plot = TRUE,
# window = 1.0, n_samples = 200,
# line = list(color = "red", width = 2),
# point = list(color = "black", size = 5, symbol = "circle")
# )
# } }
Run the code above in your browser using DataLab