top of page

#Librerías necesarias

install.packages("rgl")

install.packages("magick")

install.packages("OceanView")

install.packages("RNetCDF")

install.packages("plot3Drgl")

library(RNetCDF)

library(plot3Drgl)

#Codigo

library("rgl")

library("magick")

library(OceanView)

 

lon <- Chesapeake$lon

lat <- Chesapeake$lat

depth <- Chesapeake$depth

 

persp3D(x = lon, y = lat, z = -depth, colvar = depth, scale = FALSE,

   expand = 0.02, main = "particle distribution", plot = FALSE)

 

plotrgl(lighting = TRUE, smooth = TRUE)

for (i in 1:108) {

   tracers3Drgl(Ltrans[, 1, i], Ltrans[, 2, i], Ltrans[, 3, i],

             colvar = Ltrans[ ,4, i], col = c("green", "orange"),

             main = paste("time ", i))

Sys.sleep(0.3)  

}

# O Generar Gif

movie3d( spin3d( axis = c(0, 0, 1), rpm = 7),
         duration = 10, dir = getwd(),
         type = "gif", clean =  TRUE )

###################################################

install.packages("rgl")

install.packages("magick")

install.packages("OceanView")

library("rgl")

library("magick")

library(OceanView) 

lon <- Chesapeake$lon

lat <- Chesapeake$lat

depth <- Chesapeake$depth

 

persp3D(x = lon, y = lat, z = -depth, colvar = depth, scale = FALSE,

   expand = 0.02, main = "particle distribution", plot = FALSE)

 

plotrgl(lighting = TRUE, smooth = TRUE)

​

for (i in 1:108) {

   tracers3Drgl(Ltrans[, 1, i], Ltrans[, 2, i], Ltrans[, 3, i],

             colvar = Ltrans[ ,4, i], col = c("green", "orange"),

             main = paste("time ", i))

Sys.sleep(0.3)  

}

###################################################

”Bien! Mensaje recibido

  • b-facebook
  • Twitter Round
bottom of page