###
RG# 55: 3D plots (scenes) from data points

# data
x <- seq(-2,2,len=100)
grd <- expand.grid(x = x, y = x, z = x)
arv <- array(grd$x^2 + grd$y^2 + grd$z^4, rep(length(x),3))

require(misc3d)
cnn <- computeContour3d(arv, max(arv), 1)
drawScene(makeTriangles(cnn))
#volcano plot
data(volcano)

voldf <- local({
zz <- 7 * volcano
xx <- 20 * (1:nrow(zz))
yy <- 20 * (1:ncol(zz))
surfaceTriangles(xx, yy, zz, color="cyan2")
})
drawScene(voldf, scale = FALSE)
## No comments:

## Post a Comment

Note: Only a member of this blog may post a comment.