Description Usage Arguments References See Also Examples
Plots points on a three dimensional grid representing values in a three dimensional array. Assumes high values are inside and uses alpha blending to make outside points more transparent.
1 2 3 4 5 6 7 |
v |
three dimensional data array. |
x,y,z |
locations of grid planes at which values in |
vlim |
minimum and maximum |
col |
vector of colors for the points as generated by
|
alpha.power |
used to calculate the alpha values. The larger the
power, the smaller the alpha, the more transparent the point. Only
used if |
alpha |
vector of alpha values between 0 and 1. The length of
the vector should be equal to the length of |
breaks |
breakpoints for the colors; must give one more breakpoint than colors. |
sprites |
logical; if |
radius |
radius used in |
jitter |
logical; if |
add |
logical; if |
... |
material and texture properties. See |
Daniel Adler, Oleg Nenadic and Walter Zucchini (2003) RGL: A R-library for 3D visualization with OpenGL
image
, sprites3d
,
points3d
, jitter
.
1 2 3 4 5 6 7 8 9 10 11 12 | # view density of mixture of tri-variate normals
nmix3 <- function(x, y, z, m, s) {
0.4 * dnorm(x, m, s) * dnorm(y, m, s) * dnorm(z, m, s) +
0.3 * dnorm(x, -m, s) * dnorm(y, -m, s) * dnorm(z, -m, s) +
0.3 * dnorm(x, m, s) * dnorm(y, -1.5 * m, s) * dnorm(z, m, s)
}
f <- function(x,y,z) nmix3(x,y,z,.5,.5)
x<-seq(-2,2,len=50)
g <- expand.grid(x = x, y = x, z = x)
v <- array(f(g$x, g$y, g$z), c(length(x), length(x), length(x)))
image3d(v)
image3d(v, jitter = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.