LineStrips3D
3D line strips with positions and optional colors, radii, labels, etc.
Components
Required: LineStrip3D
Links
Examples
Simple example
"""Log a simple line strip.""" import rerun as rr rr.init("rerun_example_line_strip3d", spawn=True) points = [ [0, 0, 0], [0, 0, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1], [0, 1, 0], [0, 1, 1], ] rr.log("strip", rr.LineStrips3D([points]))
Open example recording
Many individual segments
#!/usr/bin/env python3 """Log a simple set of line segments.""" import numpy as np import rerun as rr rr.init("rerun_example_line_segments3d", spawn=True) rr.log( "segments", rr.LineStrips3D( np.array( [ [[0, 0, 0], [0, 0, 1]], [[1, 0, 0], [1, 0, 1]], [[1, 1, 0], [1, 1, 1]], [[0, 1, 0], [0, 1, 1]], ], ) ), )
Open example recording
Many strips
"""Log a batch of 3D line strips.""" import rerun as rr rr.init("rerun_example_line_strip3d_batch", spawn=True) rr.log( "strips", rr.LineStrips3D( [ [ [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]], radii=[0.025, 0.005], labels=["one strip here", "and one strip there"], ), )
Open example recording