capytaine.meshes.predefined.spheres module

Generate spherical bodies.

capytaine.meshes.predefined.spheres.mesh_sphere(*, radius=1.0, center=(0.0, 0.0, 0.0), resolution=(10, 10), axial_symmetry=False, name=None)[source]

Sphere

Parameters:
  • radius (float) – radius of the sphere

  • center (3-ple or array of shape (3,)) – position of the geometric center of the sphere

  • resolution (couple of ints) – number of panels along a meridian (or number of parallels-1) and along a parallel (or number of meridians-1)

  • axial_symmetry (bool) – if True, use the axial symmetry to build the mesh (default: False)

  • name (string) – a name identifying the sphere (default: “sphere_id” where id is an unique integer).