bundle.gs3d.generators.primitives

Procedural primitive generators: sphere, cube, torus, random cloud.

Each generator allocates a GaussianCloudArrays of the requested size and fills the position, scale, rotation, opacity, and SH DC channels. SH degrees > 0 leave the higher-order f_rest_* coefficients zero — view- dependent appearance is opt-in for synthetic content.

Colours are written into the SH DC term using the same constant the inria-graphdeco reference uses (C0 = 0.28209479177387814), so a DC value of (c - 0.5) / C0 reproduces a constant linear colour c.

Attributes

Classes

SphereGenerator

Gaussians distributed uniformly on (or in) a sphere.

CubeGenerator

Gaussians inside (or on the surface of) an axis-aligned cube.

TorusGenerator

Gaussians on a torus surface in the XY plane.

RandomCloudGenerator

Uniform random Gaussians inside an axis-aligned bounding box.

Module Contents

bundle.gs3d.generators.primitives.log
bundle.gs3d.generators.primitives.SH_C0 = 0.28209479177387814
class bundle.gs3d.generators.primitives.SphereGenerator(/, **data: Any)[source]

Bases: bundle.gs3d.generators.base.Generator

Gaussians distributed uniformly on (or in) a sphere.

radius

Sphere radius.

center

Sphere centre in world space.

surface

When True samples lie on the surface; otherwise inside.

name: str = 'sphere'
radius: float = 1.0
center: tuple[float, float, float] = (0.0, 0.0, 0.0)
surface: bool = True
async generate() → bundle.gs3d.ply.GaussianCloudArrays[source]

Produce a GaussianCloudArrays from this generator’s parameters.

class bundle.gs3d.generators.primitives.CubeGenerator(/, **data: Any)[source]

Bases: bundle.gs3d.generators.base.Generator

Gaussians inside (or on the surface of) an axis-aligned cube.

size

Edge length.

center

Cube centre.

surface

When True samples lie on the six faces; otherwise inside.

name: str = 'cube'
size: float = 1.0
center: tuple[float, float, float] = (0.0, 0.0, 0.0)
surface: bool = False
async generate() → bundle.gs3d.ply.GaussianCloudArrays[source]

Produce a GaussianCloudArrays from this generator’s parameters.

class bundle.gs3d.generators.primitives.TorusGenerator(/, **data: Any)[source]

Bases: bundle.gs3d.generators.base.Generator

Gaussians on a torus surface in the XY plane.

major_radius

Distance from torus centre to tube centre (R).

minor_radius

Tube radius (r).

center

Torus centre.

name: str = 'torus'
major_radius: float = 1.0
minor_radius: float = 0.3
center: tuple[float, float, float] = (0.0, 0.0, 0.0)
async generate() → bundle.gs3d.ply.GaussianCloudArrays[source]

Produce a GaussianCloudArrays from this generator’s parameters.

class bundle.gs3d.generators.primitives.RandomCloudGenerator(/, **data: Any)[source]

Bases: bundle.gs3d.generators.base.Generator

Uniform random Gaussians inside an axis-aligned bounding box.

bounds_min

Lower corner of the sampling box.

bounds_max

Upper corner.

name: str = 'cloud'
bounds_min: tuple[float, float, float]
bounds_max: tuple[float, float, float] = (1.0, 1.0, 1.0)
async generate() → bundle.gs3d.ply.GaussianCloudArrays[source]

Produce a GaussianCloudArrays from this generator’s parameters.