capytaine.bodies.predefined.spheres module¶
Generate spherical bodies.
- class capytaine.bodies.predefined.spheres.Sphere(*, radius=1.0, center=(0, 0, 0), ntheta=10, nphi=10, clip_free_surface=False, axial_symmetry=True, clever=None, name=None)[source]¶
Bases:
FloatingBody
Deprecated: please prefer capytaine.meshes.predefined.mesh_sphere()
- Parameters:
radius (float) – radius of the sphere
center (3-ple or array of shape (3,)) – position of the geometric center of the sphere
ntheta (int) – number of panels along a meridian (or number of parallels-1)
nphi (int) – number of panels along a parallel (or number of meridians-1)
axial_symmetry (bool) – if True, use the axial symmetry to build the mesh (default: True)
clip_free_surface (bool) – if True, only mesh the part of the sphere where z < 0 (default: False), can be used with center to obtain any clipped sphere, if True, then ntheta is the number of parallel below the free surface.
name (string) – a name identifying the sphere (default: “sphere_id” where id is an unique integer).