auto_3d: Auto aspect ratio

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Automatically modify the aspect ratio of a scene to rescale drastically different data ranges into something more pleasing.

Usage

1
2
auto_3d(x = 1, y = 1, z = 1, keep_xy = TRUE, exag = TRUE,
  silent = FALSE)

Arguments

x

exaggeration for x

y

exaggeration for y

z

exaggeration for z

keep_xy

should xy be forced to maintain their current aspect ratio

exag

should the x, y, z factors be applied, set to FALSE to ignore

Details

This is typically used to rescale data in different units, for example longitude and latitude in degrees and elevation in metres.

Value

the output of rgl::par3d invisibly

Examples

1
2
3
4
topo <- copy_down(silicate::SC(simpleworld), gebco1)
plot3d(topo);  rgl::rglwidget()

auto_3d(z = 4); rgl::rglwidget()

r-gris/trimesh documentation built on March 19, 2018, 6:53 a.m.