LineStrips2D
2D line strips with positions and optional colors, radii, labels, etc.
Components
Required: LineStrip2D
Optional: Text
, DrawOrder
, ClassId
Links
Examples
line_strip2d_simple
"""Log a simple line strip.""" import rerun as rr import rerun.blueprint as rrb rr.init("rerun_example_line_strip2d", spawn=True) rr.log( "strip", rr.LineStrips2D([[[0, 0], [2, 1], [4, -1], [6, 0]]]), ) # Set view bounds: rr.send_blueprint(rrb.Spatial2DView(visual_bounds=rrb.VisualBounds(min=[-1, -3], max=[7, 3])))
Open example recording
line_segments2d_simple
"""Log a couple 2D line segments using 2D line strips.""" import numpy as np import rerun as rr import rerun.blueprint as rrb rr.init("rerun_example_line_segments2d", spawn=True) rr.log( "segments", rr.LineStrips2D(np.array([[[0, 0], [2, 1]], [[4, -1], [6, 0]]])), ) # Set view bounds: rr.send_blueprint(rrb.Spatial2DView(visual_bounds=rrb.VisualBounds(min=[-1, -3], max=[7, 3])))
Open example recording
line_strip2d_batch
"""Log a batch of 2D line strips.""" import rerun as rr import rerun.blueprint as rrb rr.init("rerun_example_line_strip2d_batch", spawn=True) rr.log( "strips", rr.LineStrips2D( [ [[0, 0], [2, 1], [4, -1], [6, 0]], [[0, 3], [1, 4], [2, 2], [3, 4], [4, 2], [5, 4], [6, 3]], ], colors=[[255, 0, 0], [0, 255, 0]], radii=[0.025, 0.005], labels=["one strip here", "and one strip there"], ), ) # Set view bounds: rr.send_blueprint(rrb.Spatial2DView(visual_bounds=rrb.VisualBounds(min=[-1, -3], max=[7, 6])))
Open example recording