render_elevation: Render a 3D Elevation as a 2D Image

Description Usage Arguments Details

View source: R/render.R

Description

mrender_elevation runs multiple projections with the same perspective and field of view parameters so that they can be used together in a video.

Usage

1
2
3
4
5
6
render_elevation(elevation, texture, rotation, resolution, d = 1,
  zord = "mesh", empty = 0)

render_elevation_rel(elevation, texture, rotation,
  resolution = dim(elevation), d = mean(resolution), zord = "mesh",
  empty = 0)

Arguments

elevation

numeric matrix of elevations; each matrix element is assumed to be equally spaced in both X and Y dimensions.

texture

a numeric matrix with values in 0,1 of the same dimensions as elevation, where 1 means light and 0 means dark. Currently only grayscale textures are supported.

rotation

3 x 3 numeric rotation matrix.

resolution

integer(1L) the width of the output in pixels assuming there is no rotation. Actual width will depend on whether rotation causes the width to change. With render_elevation_rel should be length 2 specifying actual output size.

d

numeric(1L) distance of the observer from nearest part of the model as a multiple of the total depth of the model along the observation axis, for render_elevation_rel is the actual distance from the rotation point. Use Inf to turn off perspective (isometric).

Details

render_elevation_rel fits output to specific size (provide length 2 resolution). Oddly, it uses d as absolute distance. This is just because for the very particular use case I wrote this for it was useful to be that way.


brodieG/shadow documentation built on Aug. 12, 2019, 1:50 p.m.