Cylinders3D
3D cylinders with flat caps.
This archetype is for cylinder primitives defined by their axial length and radius.
For points whose radii are for visualization purposes, use archetypes.Points3D
instead.
Orienting and placing cylinders forms a separate transform that is applied prior to archetypes.InstancePoses3D
and archetypes.Transform3D
.
Fields fields
Required required
Recommended recommended
centers
:PoseTranslation3D
colors
:Color
Optional optional
rotation_axis_angles
:PoseRotationAxisAngle
quaternions
:PoseRotationQuat
line_radii
:Radius
fill_mode
:FillMode
labels
:Text
show_labels
:ShowLabels
class_ids
:ClassId
Can be shown in can-be-shown-in
- Spatial3DView
- Spatial2DView (if logged above active projection)
- DataframeView
API reference links api-reference-links
Example example
Batch of cylinders batch-of-cylinders
"""Log a batch of cylinders."""
import rerun as rr
rr.init("rerun_example_cylinders3d_batch", spawn=True)
rr.log(
"cylinders",
rr.Cylinders3D(
lengths=[0.0, 2.0, 4.0, 6.0, 8.0],
radii=[1.0, 0.5, 0.5, 0.5, 1.0],
colors=[
(255, 0, 0),
(188, 188, 0),
(0, 255, 0),
(0, 188, 188),
(0, 0, 255),
],
centers=[
(0.0, 0.0, 0.0),
(2.0, 0.0, 0.0),
(4.0, 0.0, 0.0),
(6.0, 0.0, 0.0),
(8.0, 0.0, 0.0),
],
rotation_axis_angles=[
rr.RotationAxisAngle(
[1.0, 0.0, 0.0],
rr.Angle(deg=float(i) * -22.5),
)
for i in range(5)
],
),
)