spheres3d(x, y = NULL, z = NULL, radius = 1, ...)
rgl.spheres(x, y = NULL, z = NULL, radius, ...)
Arguments
x, y, z
Numeric vector of point coordinates corresponding to
the center of each sphere. 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/radii
...
Material properties. See rgl.material for details.
Value
A shape ID of the spheres object is returned.
Details
If a non-isometric aspect ratio is chosen, these functions will still draw
objects that appear to the viewer to be spheres. Use ellipse3d
to draw shapes that are spherical in the data scale.
When the scale is not isometric, the radius is measured in an average scale.
Note that the bounding box calculation is always done assuming an
isometric scale, so in this case it is inaccurate: the extent of axes
with scale < 1 is underestimated, and that of axes with
scale > 1 is overestimated.
If any coordinate or radius is NA, the sphere is not plotted.