esc
Start typing to search the docs
Navigate Open

Ellipses2D

2D ellipses with half-extents (semi-axes) and optional center, colors etc.

The half-sizes specify the lengths of the ellipse's two axes along the local x and y directions. If both half-sizes are equal, the ellipse is a circle.

Fields

Required

Optional

Can be shown in

Examples

Simple 2D ellipses

"""Log a simple 2D ellipse."""

import rerun as rr

rr.init("rerun_example_ellipses2d", spawn=True)

rr.log("simple", rr.Ellipses2D(half_sizes=[(2.0, 1.0)], centers=[(0.0, 0.0)]))

Batch of 2D ellipses

"""Log a batch of 2D ellipses."""

import rerun as rr

rr.init("rerun_example_ellipses2d_batch", spawn=True)

rr.log(
    "batch",
    rr.Ellipses2D(
        centers=[(-2.0, 0.0), (0.0, 0.0), (2.5, 0.0)],
        half_sizes=[(1.5, 0.75), (0.5, 0.5), (0.75, 1.5)],
        line_radii=[0.025, 0.05, 0.025],
        colors=[(255, 0, 0), (0, 255, 0), (0, 0, 255)],
        labels=["wide", "circle", "tall"],
    ),
)