persp_rel: Apply Relative Perspective Transformation

Description Usage Arguments Value

View source: R/render.R

Description

Observer position is specified as a multiple of the Z depth of the object, measured from the nearest Z point of the object.

Usage

1
2
3
persp_rel(L, d, dist.abs = FALSE)

persp_abs(L, d, fov)

Arguments

L

list of equal length numeric vectors containing named elements 'x', 'y', and 'z'. No NA elements allowed.

d

scalar numeric observer distance from object along Z axis as a multiple of the object's Z-depth, or for persp_abs the distance from the midpoint of the model..

dist.abs

TRUE or FALSE, if TRUE then distance is measured directly from point of rotation, otherwise as multiples of model depth.

Value

L, with 'x', and 'y' components scaled for perspective, and 'x', 'y', and 'z' components normalized so that the origin is in the middle of the 'x'-'y' with the observer Z position at zero.


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