light {rgl}R Documentation

add light source

Description

add a light source to the scene.

Usage

light3d(theta = 0, phi = 15, ...)
rgl.light( theta = 0, phi = 0, viewpoint.rel = TRUE, ambient = "#FFFFFF", 
           diffuse = "#FFFFFF", specular = "#FFFFFF")

Arguments

theta, phi polar coordinates
viewpoint.rel logical, if TRUE light is a viewpoint light that is positioned relative to the current viewpoint
ambient, diffuse, specular
... generic arguments passed through to RGL-specific (or other) functions

Details

Up to 8 light sources are supported. They are positioned either in world space or relative to the camera using polar coordinates. Light sources are directional.

Value

This function is called for the side effect of adding a light. A light ID is returned to allow rgl.pop to remove it.

See Also

rgl.clear rgl.pop


[Package rgl version 0.70 Index]