rgl.material(
color = c("white"),
alpha = c(1.0),
lit = TRUE,
ambient = "black",
specular = "white",
emission = "black",
shininess = 50.0,
smooth = TRUE,
texture = NULL,
textype = "rgb",
texmipmap = FALSE,
texminfilter = "linear",
texmagfilter = "linear",
texenvmap = FALSE,
front = "fill",
back = "fill",
size = 3.0,
lwd = 1.0,
fog = TRUE,
point_antialias = FALSE,
line_antialias = FALSE,
...
)
material3d(...)rgl.material() is called for the side effect of setting the material properties.
It returns a value invisibly which is not intended for use by the user.Users should use material3d() to query material properties. It returns values similarly
to par3d as follows:
When setting properties, it returns the previous values in a named list. A named list is also
returned when more than one value is queried. When a single value is queried it is returned
directly.
material3d is an alternate interface to the material properties, modelled after
par3d: rather than setting defaults for parameters that are not specified,
they will be left unchanged. material3d may also be used to query the material
properties; see the examples below. The current implementation does not return parameters for textures.
If point_antialias is TRUE, points will be drawn as circles; otherwise, they
will be drawn as squares. Lines tend to appear heavier with line_antialias==TRUE.
The material member of the r3dDefaults list may be used to
set default values for material properties.
The ... parameter to rgl.material is ignored.
rgl.primitive,
rgl.bbox,
rgl.bg,
rgl.lightsave <- material3d("color")
material3d(color="red")
material3d("color")
material3d(color=save)Run the code above in your browser using DataLab