bg3d

0th

Percentile

Set up Background

Set up the background of the scene.

Keywords
dynamic
Usage
bg3d(...) 
rgl.bg( sphere = FALSE, fogtype = "none", color = c("black", "white"), 
	back = "lines", ...)
Arguments
fogtype
fog type: [object Object],[object Object],[object Object],[object Object]
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 material3d for details.
back
Specifies the fill style of the sphere geometry. See material3d for details.
...
Material properties. See material3d for details.
Details

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

If not, but the material properties include a bitmap as a texture, the bitmap is drawn in the background of the scene. (The bitmap colors modify the general color setting.)

If neither a sphere nor a bitmap background is drawn, the background is filled with a solid color.

Note

The writeWebGL function only supports solid color backgrounds.

See Also

material3d, bgplot3d to add a 2D plot as background.

Aliases
  • rgl.bg
  • bg3d
Examples
open3d()
  
  # a simple white background
  
  bg3d("white")

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

  bg3d(sphere = TRUE, color = c("black", "green"), lit = FALSE, back = "lines" )

  # an environmental sphere with a nice texture.

  bg3d(sphere = TRUE, texture = system.file("textures/sunsleep.png", package = "rgl"), 
         back = "filled" )
         
  # The same texture as a fixed background
  
  open3d()
  bg3d(texture = system.file("textures/sunsleep.png", package = "rgl"), col = "white")
Documentation reproduced from package rgl, version 0.95.1367, License: GPL

Community examples

Looks like there are no examples yet.