Usage
mesh3d(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, type = "vrml", x = NULL, y = NULL, z = NULL, edges = NULL, obj_infile = NULL, filename = "out.wrl", write_obj = FALSE, cols = "red", scalefac = 4, autoscale = ifelse(is.null(obj_infile), "independent", "equicenter"), lab.axis = c("X-axis", "Y-axis", "Z-axis"), col.axis = "black", showaxis = TRUE, col.lab = "black", col.bg = "white", cex.lab = 1, htmlout = NULL, hwidth = 1200, hheight = 800, vrml_navigation = "EXAMINE", vrml_transparency = 0, vrml_fov = 0.785, vrml_pos = rep(scalefac + 4, 3), vrml_dir = c(0.19, 0.45, 0.87, 2.45), lg3d_ambientlight = 0.5)
Arguments
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 parameter "param1"
range2
value range for parameter "param2"
size1
mesh size for the first parameter used in
parametric functions
size2
mesh size for the second parameter used in
parametric functions
type
the output type ("vrml" or "lg3d"), this will be
set automatically if mesh3d is called after vrml.open() or
lg3d.open()
x
a 3-column numeric matrix of coordinates or a numeric
vector of x-coordinates (not used if parameter obj\_infile or
xfun is specified)
y
a numeric vector of y-coordinates (only needed if x is
a vector)
z
a numeric vector of z-coordinates (only needed if x is
a vector)
edges
a numerical matrix in which each row contains a
sequence of vertex identifiers representing the edges of a
polygonal face (vertex identifiers are integer numbers,
starting with 0)
obj_infile
filename of a 3D mesh input file in obj-format
(not required if edges and x,y,z or the parameters for
parametric functions are specified)
filename
filename of the generated output file
write_obj
TRUE, if the output is to be created in the
obj-format (requires parameters x,y,z and edges to be set)
cols
the color of the output
scalefac
a numerical scaling factor to increase/decrease
the size of the plotted 3D objects
autoscale
the scaling type. "independent" means all axes
are auto-scaled independently. "equidist" means all axes are
scaled by the same factor and "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
cex.lab
scaling factor for axis label font size
htmlout
a filename for generating an HTML-file to embed
the output
hwidth
width of the embedded visualization in the
HTML-output
hheight
height of the embedded visualization in the
HTML-output
vrml_navigation
type of mouse navigation in the VRML file,
can be "EXAMINE", "WALK", "SLIDE", "FLY" or "PAN" (VRML only)
vrml_transparency
a number between 0 and 1 specifying the
transparency level of plotted objects (VRML only)
vrml_fov
a scalar defining the field of view angle in the
VRML file in radians (VRML only)
vrml_pos
a vector of size 3 corresponding to the position
of the viewpoint (VRML only)
vrml_dir
a vector of size 4 specifying the viewing direction
(first 3 components) and the rotation of the camera around the
direction vector (last component in radians, VRML only)
lg3d_ambientlight
ambient light gray level (value between
0 and 1, LG3D only)