RT.Surface: Validate parameters, and return a valid surface object

Description Usage Arguments Value Examples

View source: R/surface.R

Description

Validate parameters, and return a valid surface object

Usage

1
RT.Surface(rgb, matteness = 0, transparency = 0)

Arguments

rgb

Either a 3 value vector of numbers in teh range 0 to 1, or a function which will return the equivalent. The function, if present, will be passed the values of *north* and *east* as returned by the object's intersection. The function allow interesting surface properties to be easily constructed, for example patterned, image mapping, smoothing or randomisation.

matteness

The proportion of matte reflectivity of the surface. 1 minus this value will be reflected as mirror reflection. Default = 0, i.e the surface has mirror reflectivity

transparency

The proportion of incident light which will be refracted by the surface. 1 minus this value will be reflected. Default = 0, i.e. a non-transparent surface.

Value

A validated surface object. Ray tracing functions in this package expect all solid objects to have a valid surface property.

Examples

1
  surf <- RT.Surface(rgb=c(1,1,0), transparency=1)

JerBoon/raytrace documentation built on May 17, 2019, 6:19 p.m.