Cylinder

Qualified name: algan.mobs.shapes\_3d.Cylinder

class Cylinder(radius=1, height=1, *args, **kwargs)[source]

Bases: Surface

A 3-D cylinder.

Parameters:
  • radius – Cylinder radius.

  • height – Cylinder height.

  • *args – Passed to Surface

  • **kwargs – Passed to Surface

Methods

coord_function

Default function used to map intrinsic coordinates to world space to define manifold shape.

move_between_points

normal_function

Default function used to map intrinsic coordinates to world space normals to define manifold normal directions.

set_start_point

Attributes

animation_manager

basis

The flattened 3x3 matrix representing the Mob's orientation and scale.

color

glow

location

The 3-D location of the Mob in world space.

max_opacity

normalized_basis

The Mob's basis matrix with all its row vectors normalized to unit length.

opacity

scale_coefficient

The scaling factor of the Mob along its local axes, derived from the basis.

coord_function(uv)[source]

Default function used to map intrinsic coordinates to world space to define manifold shape. This method is overwritten by subclasses to define new shapes.

Parameters:

uv (torch.Tensor[*, 2]) – Collection of 2-D coordinates to be mapped.

normal_function(uv)[source]

Default function used to map intrinsic coordinates to world space normals to define manifold normal directions. This method is overwritten by subclasses to define new shapes.

Parameters:

uv (torch.Tensor[*, 2]) – Collection of 2-D coordinates to be mapped.