rgl.primitive {rgl}R Documentation

add primitive set shape

Description

Adds a shape node to the current scene

Usage

rgl.points(x, y = NULL, z = NULL, ... )
rgl.lines(x, y = NULL, z = NULL, ... )
rgl.linestrips(x, y = NULL, z = NULL, ...)
rgl.triangles(x, y = NULL, z = NULL, ... )
rgl.quads(x, y = NULL, z = NULL, ... )

Arguments

x, y, z coordinates. Any reasonable way of defining the coordinates is acceptable. See the function xyz.coords for details.
... Material properties. See rgl.material for details.

Details

Adds a shape node to the scene. The appearance is defined by the material properties. See rgl.material for details.

Value

Each primitive function returns the integer object ID of the shape that was added to the scene. These can be passed to rgl.pop to remove the object from the scene.

See Also

rgl.material, rgl.spheres, rgl.texts, rgl.surface, rgl.sprites

Examples

rgl.open()
rgl.points(rnorm(1000), rnorm(1000), rnorm(1000), color=heat.colors(1000), size=2)

[Package rgl version 0.70 Index]