Batched variant of generate_tube(): all tubes are generated into one
mesh. Paths may differ in length. This is the function to use for curved
edges, e.g. connectome edges drawn as arcs.
Usage
generate_tubes(
paths,
radii = 0.1,
colors = c(1, 1, 1, 1),
segments = 12L,
caps = FALSE
)Arguments
- paths
List of Nx3 numeric matrices (one per tube). Each path needs at least two distinct points to produce geometry.
- radii
Numeric vector of radii (length 1, recycled; or one per tube).
- colors
RGBA colour(s): a single vector applied to all tubes, or an Nx4 numeric matrix (values in
[0, 1], alpha optional).- segments
Subdivision count around the circumference (default 12).
- caps
Whether to close both ends of every tube (default FALSE, since batched tubes are typically connected at their ends).