lmesh {vrmlgen} | R Documentation |
lmesh visualizes parametric functions in the LiveGraphics3D-format.
lmesh(xfun = "sin(v)*cos(u)", yfun = "sin(v)*sin(u)", zfun = "cos(v)", param1 = "u", param2 = "v", range1 = c(0,2*pi), range2 = c(0,pi), size1 = 30, size2 = 30, filename = "out.m", cols = "red", scalefac = 4, autoscale = "independent", lab.axis = c("X-axis", "Y-axis", "Z-axis"), col.axis = "black", showaxis = TRUE, col.lab = "black", col.bg = "white", cex.lab = 1, ambientlight = 0.5, htmlout = NULL, hwidth = 1200, hheight = 800)
xfun |
parametric function to define curves and surfaces (1. dimension) |
yfun |
parametric function to define curves and surfaces (2. dimension) |
zfun |
parametric function to define curves and surfaces (3. dimension) |
param1 |
name of the first parameter used in parametric functions |
param2 |
name of the second parameter used in parametric functions |
range1 |
value range for the first parameter for parametric functions |
range2 |
value range for the second parameter for parametric functions |
size1 |
mesh size for the first parameter used in parametric functions |
size2 |
mesh size for the second parameter used in parametric functions |
filename |
filename of the generated LiveGraphics3D output file |
cols |
a vector of colors to visualize different classes among the data points. The number of colors should be at least as large as the number of different labels (i.e. length(col) >= length(unique(labels)) |
scalefac |
a scaling factor for the size of the 3D box in which the data will be visualized |
autoscale |
the scaling type. "independent" means all axes are auto-scaled independently, "equidist" means all axes are scaled by the same factor, "equicenter" additionally positions the drawn object in the center, "none" means no scaling is applied |
lab.axis |
a vector of size 3 containing the axis labels |
col.axis |
color of the axis |
showaxis |
if FALSE, the coordinate axes are hidden in the output |
col.lab |
a vector of colors specifying the axis labels |
col.bg |
background color |
cex.lab |
scaling factor for axis label font size |
ambientlight |
ambient light gray level (between 0 and 1) |
htmlout |
a filename for generating an HTML-file to embed |
hwidth |
width of the embedded VRML-display in the HTML-output |
hheight |
height of the embedded VRML-display in the HTML-output |
A parametric function can be defined with the xfun, yfun and zfun parameters. Additionally, the parameter names and ranges have to be specified using the param1, param2, range1 and range2 parameters. The htmlout-parameter can be used to embed the resulting LiveGraphics3D object in a HTML-file.
The function is used for its side-effect (output of a VRML-file in the specified directory) and has no return value.
Enrico Glaab
# Visualization of a parametric function # defining the surface of 3D spiral lmesh(xfun="s*cos(s)*(4 + cos(t+s))", yfun="s*sin(s)*(4 + cos(t+s))", zfun="s*sin(t+s)", param1="s", param2="t", range1=c(0,4*pi), range2=c(0,2*pi))