top of page

#Codigo

x <- seq(-10, 10, length= 30)
y <- x
f <- function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
z <- outer(x, y, f)
for(i in 1:1439){
persp(x, y, z, theta =i/8, phi =i/8, 
expand = 0.5, col = rainbow(i),
ltheta = 120, shade = 0.75, 
ticktype = "detailed",
xlab = "X", ylab = "Y", zlab = "Z")
}

Si hay problemas en Rstudio, probar directamente en R

###################################################
x <- seq(-10, 10, length= 30)
y <- x
f <- function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
z <- outer(x, y, f)
for(i in 1:1439){
persp(x, y, z, theta =i/8, phi =i/8, 
expand = 0.5, col = rainbow(i),
ltheta = 120, shade = 0.75, 
ticktype = "detailed",
xlab = "X", ylab = "Y", zlab = "Z")
}
###################################################

”Bien! Mensaje recibido

  • b-facebook
  • Twitter Round
bottom of page