radar.utils.animate.geometry

Geometry Layout Management Module.

Provides abstractions and utility classes to parse spatial coordinates from Polars DataFrames and map them into Manim 3D visualization objects (VGroups).

Module Contents

Classes

GeometryInterface

Abstract Base Class acting as an interface for all radar geometry layouts.

Geometry

Utility handler for converting tabular position data into 3D Manim spaces.

API

class radar.utils.animate.geometry.GeometryInterface[source]

Bases: abc.ABC

Abstract Base Class acting as an interface for all radar geometry layouts.

Enforces unified generation signatures across custom layout variations (e.g., Grid, Circular, Cross).

abstractmethod geometry(position: numpy.typing.NDArray, colour: manim.ManimColor) manim.VGroup[source]

Generate the Manim VGroup representation of the layout geometry.

Args:

position (npt.NDArray): The 3D translation vector [x, y, z] for the layout. colour (ManimColor): The structural color assigned to the rendered points.

Returns:

VGroup: A collection containing the spatial mobjects.

__slots__ = ()
class radar.utils.animate.geometry.Geometry[source]

Utility handler for converting tabular position data into 3D Manim spaces.

classmethod dots_3d(df: polars.DataFrame, position: numpy.typing.NDArray, colour: manim.ManimColor) manim.VGroup[source]

Convert a DataFrame of spatial elements into a 3D space of positioned Dots.

Args:

df (pl.DataFrame): Tabular dataset containing spatial coordinates. position (npt.NDArray): Anchor position vector for the underlying 3D axes. colour (ManimColor): Color token applied to all generated dots.

Returns:

VGroup: A collection containing the translated 3D Dot mobjects.

static _df_to_dots(df: polars.DataFrame, position: numpy.typing.NDArray, color: manim.ManimColor) manim.VGroup[source]

Internal implementation mapping DataFrame positions onto a localized 3D coordinate system.

Changed from @classmethod to @staticmethod since it does not mutate or reference the class state directly.

Args:

df (pl.DataFrame): Tabular dataset containing element points. position (npt.NDArray): Origin anchor offset for the workspace axes. color (ManimColor): Color attribute for the resulting dots.

Returns:

VGroup: The populated group containing structural array dots.