shade3d: Draw a mesh as surfaces in 3D

Description Usage Arguments Details See Also Examples

Description

Draw surfaces with rgl from any shape3d classed object. Produces a 3D surface plot from a mesh-alike object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
## S3 method for class 'TRI'
shade3d(x, ...)

## S3 method for class 'TRI0'
shade3d(x, ...)

## S3 method for class 'PATH'
shade3d(x, ...)

## S3 method for class 'PATH0'
shade3d(x, ...)

## S3 method for class 'DEL'
shade3d(x, ...)

## S3 method for class 'DEL0'
shade3d(x, ...)

## S3 method for class 'QUAD'
shade3d(x, ...)

## S3 method for class 'BasicRaster'
shade3d(x, ...)

## S3 method for class 'matrix'
shade3d(x, ...)

## S3 method for class 'sfc'
shade3d(x, ...)

## S3 method for class 'sf'
shade3d(x, ...)

## S3 method for class 'SC'
shade3d(x, ...)

## S3 method for class 'SC0'
shade3d(x, ...)

## S3 method for class 'Spatial'
shade3d(x, ...)

## S3 method for class 'triangulation'
shade3d(x, ...)

Arguments

x

sp, sf, raster, or any other surface model understood by anglr/silicate

...

pass material3d properties to rgl

Details

Objects that are not explicitly surfaces will be triangulated in order to produce the mesh. Whether this is a good idea or not is an open question, and some conversions will fail due to "extra" attributes like z or time stored on vertices. Polygons are only implicit surfaces but these are usually unproblematic to triangulate so this is done.

See Also

plot3d as.mesh3d persp3d dot3d wire3d mesh_plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
rgl::open3d()
shade3d(volcano)


## create a globe plot of land areas with elevation
rgl::open3d()
world <- copy_down(DEL(simpleworld, max_area = 0.5), gebco * 50)
shade3d(globe(world), specular = "black", color = "white")
rgl::spheres3d(0, 0, 0, radius = 6378000, col = "dodgerblue", alpha = 0.75)
rgl::bg3d("black")

anglr documentation built on July 29, 2020, 9:06 a.m.