add sprite set shape
Adds a sprite set shape node to the scene.
1 2 3
point coordinates. Any reasonable way of defining the
coordinates is acceptable. See the function
vector or single value defining the sphere radius
material properties when
Simple sprites (used when
NULL) are 1 by 1 squares
that are directed towards the viewpoint. Their primary use is for
fast (and faked) atmospherical effects, e.g. particles and clouds
using alpha blended textures. Particles are Sprites using an alpha-blended
particle texture giving the illusion of clouds and gasses.
The centre of each square will be at the coordinates given by
x, y, z.
shapes is not
NULL, it should be a vector of
identifers of objects to plot in the scene (e.g. as returned by
plotting functions or by
rgl.ids). These objects will
be removed from the scene and duplicated as a sprite image in a
constant orientation, as specified by
0, 0, 0 will be plotted at the coordinates given by
x, y, z.
userMatrix argument is ignored for
shapes = NULL. For
sprites3d defaults the matrix to
rgl.sprites defaults it to an identity transformation.
If any coordinate is
NA, the sprite is not plotted.
The id values of the shapes are retrieved using
the user matrix is retrieved using
These functions are called for the side effect of displaying the sprites. The shape ID of the displayed object is returned.
1 2 3 4 5 6 7
open3d() particles3d( rnorm(100), rnorm(100), rnorm(100), color = rainbow(100) ) # is the same as sprites3d( rnorm(100), rnorm(100), rnorm(100), color = rainbow(100), lit = FALSE, alpha = .2, textype = "alpha", texture = system.file("textures/particle.png", package = "rgl") ) sprites3d( rnorm(10) + 6, rnorm(10), rnorm(10), shape = shade3d(tetrahedron3d(), col = "red") )
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.