Draw points with rgl from any mesh-alike or shape3d classed
object. Produces a 3D scatterplot like that of rgl::points3d()
, but
from a mesh-alike object.
# S3 method for sf dot3d(x, ...) # S3 method for sfc dot3d(x, ...) # S3 method for Spatial dot3d(x, ...) # S3 method for matrix dot3d(x, ...) # S3 method for BasicRaster dot3d(x, ...) # S3 method for sc dot3d(x, ...) # S3 method for SC dot3d(x, ...) # S3 method for SC0 dot3d(x, ...) # S3 method for triangulation dot3d(x, ...)
x | sc, sp, sf, raster, trip, or any other model understood by anglr/silicate |
---|---|
... | pass material3d properties to rgl |
The class mesh3d extends 'shape3d' and allows methods to plot
non-surface properties. Note that dot3d()
will always add to an existing
scene.
It is not currently technically defined or clear how colour properties are mapped to dots by default ... there is a problem of what property to use from features that share the same vertex, and we have put that aside and erred on the side of inaccuracy in favour of getting a pretty plot (hopefully). (Properties that come later - lower rows - win, I think.
(For some reason size
is not vectorized like col
is, but this is not
explored in detail from an anglr view).
#> wgl #> 2## from ?persp y <- x <- seq(-10, 10, length= 80) z <- outer(x, y, function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }) dot3d(z) dot3d(raster::raster(volcano), size = 10) auto_3d() # \donttest{ dot3d(silicate::SC(cad_tas)) rgl::open3d()#> wgl #> 3