bg {rgl}R Documentation

setup Background

Description

Setup the background environment of the scene.

Usage

bg3d(color, ...) 
rgl.bg( sphere = FALSE, fogtype = "none", color=c("black","white"), back="lines", ...)

Arguments

fogtype fog type:
"none"
no fog
"linear"
linear fog function
"exp"
exponential fog function
"exp2"
squared exponential fog function
sphere logical, if true, an environmental sphere geometry is used for the background decoration.
color Primary color is used for background clearing and as fog color. Secondary color is used for background sphere geometry. See rgl.material for details.
back Specifies the fill style of the sphere geometry. See rgl.material for details.
... Material properties. See rgl.material for details.

Details

If sphere is set to TRUE, an environmental sphere enclosing the whole scene is drawn.

See Also

rgl.material

Examples

  # a simple white background
  
  bg3d("white")

  # the holo-globe (inspired by star trek):

  rgl.bg(sphere=TRUE, color=c("black","green"), lit=FALSE, back="lines" )

  # an environmental sphere with a nice texture.

  rgl.bg(sphere=TRUE, texture=system.file("textures/sunsleep.png", package="rgl"), back="filled" )

[Package rgl version 0.65 Index]