Completa i seguenti comandi di R in modo da ottenere la figura a lato. | |
source("http://macosa.dima.unige.it/r.R") x <- function(t) 6*cos(t)-cos(6*t) y <- function(t) 6*sin(t)-sin(6*t) |
La curva è nota come "ranuncolo" (o come "buttercup"). Cerca parametric plane curves in WolframAlpha per altre curve "famose". Ecco come si potevano completare i comandi:
source("http://macosa.dima.unige.it/r.R")
x <- function(t) 6*cos(t)-cos(6*t)
y <- function(t) 6*sin(t)-sin(6*t)
paramb(x,y, 0,2*pi,"red")
# o:
PLANE(-6.5,6.5, -6.5,6.5)
param(x,y, 0,2*pi,"red")