Linestrip3D

Linestrip3D represents a series of connected line segments in three-dimensional space. The linestrip3d component is defined by a list of 3d points, which are connected sequentially. Additionally, linestrips can be drawn with color and radius. The radius controls the thickness of the line segments.

There are currently two python APIs that both use the same underlying Linestrip3D archetype.

Notes:

  • There is not currently a python API for logging a batch of linestrips.
  • In the python APIs radius is currently derived from stroke_width

Components and APIs

Primary component: linestrip3d

Secondary components: colorrgba, radius

Python APIs: log_line_strip, log_line_segments

Rust API: LineStrip3D

Simple Examples

"""Log a simple line strip.""" import rerun as rr rr.init("rerun_example_line_strip3d", spawn=True) rr.log_line_strip( "simple", [ [0, 0, 0], [0, 0, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 0], [0, 1, 1], ], )
"""Log a simple set of line segments.""" import rerun as rr rr.init("rerun_example_line_segments3d", spawn=True) rr.log_line_segments( "simple", [ [0, 0, 0], [0, 0, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 0], [0, 1, 1], ], )

Batch Examples

"""Log a batch of 3d line strips.""" import rerun as rr rr.init("rerun_example_line_strip3d", spawn=True) rr.log_line_strips_3d( "batch", [ [ [0, 0, 2], [1, 0, 2], [1, 1, 2], [0, 1, 2], ], [ [0, 0, 0], [0, 0, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 0], [0, 1, 1], ], ], colors=[[255, 0, 0], [0, 255, 0]], stroke_widths=[0.05, 0.01], )