plot_pfun: Plot a parametric mathematical function

plot_pfunR Documentation

Plot a parametric mathematical function

Description

Plot a 2d or 3d parametric mathematical function f(t) = (x(t), y(t), z(t))

Usage

plot_pfun(
  f = NULL,
  from = NULL,
  to = NULL,
  points = 100,
  col = "black",
  cartesian_plane = TRUE,
  cartesian_plane_col = "black",
  grid_at_x = NULL,
  grid_at_y = NULL,
  add = FALSE,
  ...
)

Arguments

f

a named list of function

from

domain (plotting) starting point

to

domain (plotting) ending point

points

number of points

col

the function color

cartesian_plane

wheter to add a cartesian plane ...

cartesian_plane_col

... and its color

grid_at_x

at_x param for add_grid

grid_at_y

at_y param for add_grid

add

if TRUE the function is added within an existing graph

...

other params given to plot

Value

Nothing. As a side effect the plot of pch.

Examples

pfun <- list(x = function(t) 2 * cos(t), y = function(t) 3 * sin(t))
plot_pfun(pfun, from = 0, to = pi)
plot_pfun(pfun, from = 0, to = 2*pi)

pfun2 <- list(x = function(t) 1 * cos(t),
              y = function(t) 1 * sin(t),
              z = function(t) 1 * t)
plot_pfun(pfun2, from = 0, to = 100, points = 1000)


lbraglia/lbmisc documentation built on April 29, 2024, 11:27 a.m.