Convenience wrapper around line_layer for the case where no
meshes are involved: the segments are drawn (with a screen-space width) into
an image and nothing else. To combine lines with meshes, add the layer to a
scene instead and render that scene.
Usage
render_segments(
from,
to,
colors = NULL,
width = 1,
camera = NULL,
options = render_options(),
lit = FALSE
)Arguments
- from
Nx3 numeric matrix of segment start points (or a length-3 vector).
- to
Nx3 numeric matrix of segment end points (same number of rows as
from).- colors
RGBA colour(s): a single vector applied to all segments, or an Nx4 numeric matrix.
NULL(the default) uses thedefault_colorof the render options.- width
Line width in pixels (default 1).
- camera
A camera list, e.g. from
cameraorcamera_auto. Defaults to a camera framing the segments.- options
Render options, see
render_options.- lit
Whether to apply lighting (default
FALSE, flat colour).
Value
An image list, see render_scene.