rgl.bg {rgl}R Documentation

setup Background

Description

Setup the background environment in the scene.

Usage

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 background decoration
color Primary color is used for background clearing. Secondary color is used for sphere geometry. See \line{rgl.material} for details.
back Specifies the fill style of the sphere geometry. See \line{rgl.material} for details.
... Material properties. See rgl.material for details.

Details

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

See Also

rgl.material

Examples


  # 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 Contents]