View source: R/related_rates.R
| vc_plot_related_rates | R Documentation |
Display the gradient and a stored related-rates velocity
vc_plot_related_rates(
result,
g,
xlim = NULL,
ylim = NULL,
n = 61L,
vector_scale = 1,
title = NULL
)
result |
Result of vc_related_rates() in two dimensions. |
g |
Same scalar constraint used for calculation. |
xlim, ylim |
Optional contour bounds covering the point and velocity tip. |
n |
Number of samples per contour coordinate, at least two. |
vector_scale |
Positive display multiplier for both vectors. |
title |
Optional character title. |
Reuses vc_plot_gradient without recalculating derivatives or rates. The velocity segment is a local first-order vector, not an integrated path.
Plotly widget; unresolved velocities are omitted. Sampled contours show the scalar field, not a certified constraint curve or path.
if(requireNamespace("plotly",quietly=TRUE)) {
g <- function(v)sum(v^2)-25
r <- vc_related_rates(g,c(4,3),c(-1,NA),TRUE)
vc_plot_related_rates(r,g,vector_scale=.2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.