#Codigo
library("rgl")
library("magick")
library(OceanView)
load(file = "argo.rda")
xlim <- c(-90, 50)
ylim <- c(-70, 70)
ii <- which (Hypsometry$x >= xlim[1] & Hypsometry$x <= xlim[2])
jj <- which (Hypsometry$y >= ylim[1] & Hypsometry$y <= ylim[2])
mx <- Hypsometry$x[ii]
my <- Hypsometry$y[jj]
mz <- Hypsometry$z[ii,jj]
mz [ mz > 0] <- 0
persp3D(x = mx, y = my, z = mz, col = "grey", plot = FALSE,
main = "argo floats, januari 2012", cex.main = 2)
clim <- range(argo$temp, na.rm = TRUE)
with (argo,
for (i in 1:length(Time)) {
pmin <- min(-press[[i]] , na.rm = TRUE)
scatter3D(longitude[[i]], latitude[[i]], -press[[i]] , colvar = temp[[i]] ,
plot = FALSE, add = TRUE, pch = 16, cex = 0.6, clim = clim,
colkey = FALSE, NAcol = "transparent")
}
)
plotrgl(smooth = TRUE, lighting = TRUE)
#Giro Automatico
play3d( spin3d( axis = c(0, 0, 1), rpm = 7), duration = 100 )
# 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)
load(file = "argo.rda")
xlim <- c(-90, 50)
ylim <- c(-70, 70)
ii <- which (Hypsometry$x >= xlim[1] & Hypsometry$x <= xlim[2])
jj <- which (Hypsometry$y >= ylim[1] & Hypsometry$y <= ylim[2])
mx <- Hypsometry$x[ii]
my <- Hypsometry$y[jj]
mz <- Hypsometry$z[ii,jj]
mz [ mz > 0] <- 0
persp3D(x = mx, y = my, z = mz, col = "grey", plot = FALSE,
main = "argo floats, januari 2012", cex.main = 2)
clim <- range(argo$temp, na.rm = TRUE)
with (argo,
for (i in 1:length(Time)) {
pmin <- min(-press[[i]] , na.rm = TRUE)
scatter3D(longitude[[i]], latitude[[i]], -press[[i]] , colvar = temp[[i]] ,
plot = FALSE, add = TRUE, pch = 16, cex = 0.6, clim = clim,
colkey = FALSE, NAcol = "transparent")
}
)
plotrgl(smooth = TRUE, lighting = TRUE)
play3d( spin3d( axis = c(0, 0, 1), rpm = 7), duration = 100 )
###################################################