morfeus.plotting module#

Plotting functions.

morfeus.plotting.get_drawing_arrow(start=None, direction=None, length=1, shaft_radius=0.05, shaft_resolution=20, tip_length=0.25, tip_radius=0.1, tip_resolution=20)[source]#

Creates PyVista 3D arrow from cone and cylider.

Parameters:
  • start (Sequence[float] | None) – Starting point (Å)

  • direction (Sequence[float] | None) – Direction vector (Å)

  • length (float) – Length (Å)

  • shaft_radius (float) – Shaft radius (Å)

  • shaft_resolution (int) – Shaft resolution

  • tip_length (float) – Tip length (Å)

  • tip_radius: (Tip radius: Å) – Tip radius:

  • tip_resolution (int) – Tip resoluation

  • tip_radius (float) –

Returns:

3D arrow

Return type:

arrow

morfeus.plotting.get_drawing_cone(center=None, direction=None, height=1.0, radius=None, capping=True, angle=None, resolution=6)[source]#

Create a cone.

Copy from the PyVista code.

Parameters:
  • center (Sequence[float] | None) – Center in [x, y, z]. middle of the axis of the cone.

  • direction (Sequence[float] | None) – Direction vector in [x, y, z]. orientation vector of the cone.

  • height (float) – Height along the cone in its specified direction.

  • radius (float | None) – Base radius of the cone

  • capping (bool) – Turn on/off whether to cap the base of the cone with a polygon.

  • angle (float | None) – The angle degrees between the axis of the cone and a generatrix.

  • resolution (int) – Number of facets used to represent the cone

Returns:

3D cone

Return type:

cone

Raises:

Exception – When both radius and angle are specified.