R: Create a Set of Lines with Tetrahetra Centered at Points...
linesTetrahedra
R Documentation
Create a Set of Lines with Tetrahetra Centered at Points along
the Lines
Description
Creates a scene consisting of lines made up of small tetrahedra
centered at points along them.
Usage
linesTetrahedra(x, y, z, delta=c(min(x[,2]-x[,1])/10,
min(y[,2]-y[,1])/10,
min(z[,2]-z[,1])/10),
lwd = 0.01, color = "black", ...)
Arguments
x, y, z
numeric vectors of length two or matrices with two
columns representing coordinates of starting and ending points
of line(s).
delta
numeric; increase in each dimension used to locate points
along the lines; recycled to length 3.
lwd
numeric; used for the size of the tetrahedron in each
dimension; recycled to length 3.
color
color to use for the tetrahedra.
...
additional arguments to be passed on to
makeTriangles.
Details
The function uses the Bresenham's line algorithm to locate points along
lines and then creates a triangle mesh scene representing tetrahedra
centered at those points.
Value
Returns a triangle mesh scene representing the lines.