How can I show objects further away with a fade-out effect in rgl?
Currently, given a 3D scatter plot, R's rgl package displays objects further away with a smaller size. However, I still find it difficult to perceive an object's depth, especially when many points are plotted. In the following example, without rotating, it is hard to see which point is behind another.
x <- 1:101
y <- rnorm(101, sd=15)
z <- x + rnorm(101, sd=15)
library(rgl)
plot3d(x,y,z, type='s')
But in the image below, it is easy to see that points on the left of the picture are further away. How can I achieve a similar effect in rgl? There is an alpha
argument, but that does not depend on the depth of each point.