rgl (version 0.83-3)

sprites: add sprite set shape

Description

Adds a sprite set shape node to the scene.

Usage

sprites3d(x, y = NULL, z = NULL, radius = 1, ...)
particles3d(x, y = NULL, z = NULL, radius = 1, ...)
rgl.sprites(x, y = NULL, z = NULL, radius = 1, ...)

Arguments

x, y, z
point coordinates. Any reasonable way of defining the coordinates is acceptable. See the function xyz.coords for details.
radius
vector or single value defining the sphere radius
...
material properties, texture mapping is supported

Value

  • These functions are called for the side effect of displaying the sprites. The shape ID of the displayed object is returned.

Details

Sprites are rectangle planes 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. If any coordinate is NA, the sprite is not plotted.

See Also

rgl.material

Examples

Run this code
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") )

Run the code above in your browser using DataLab