Sphere
#
- class ansys.geometry.core.shapes.surfaces.sphere.Sphere(origin: numpy.ndarray | ansys.geometry.core.typing.RealSequence | ansys.geometry.core.math.point.Point3D, radius: pint.Quantity | ansys.geometry.core.misc.measurements.Distance | ansys.geometry.core.typing.Real, reference: numpy.ndarray | ansys.geometry.core.typing.RealSequence | ansys.geometry.core.math.vector.UnitVector3D | ansys.geometry.core.math.vector.Vector3D = UNITVECTOR3D_X, axis: numpy.ndarray | ansys.geometry.core.typing.RealSequence | ansys.geometry.core.math.vector.UnitVector3D | ansys.geometry.core.math.vector.Vector3D = UNITVECTOR3D_Z)#
Bases:
ansys.geometry.core.shapes.surfaces.surface.Surface
Provides 3D sphere representation.
Overview#
Check a parameter is within the parametric range of the surface. |
|
Check a point is contained by the surface. |
Create a transformed copy of the sphere from a transformation matrix. |
|
Create a mirrored copy of the sphere along the y-axis. |
|
Evaluate the sphere at the given parameters. |
|
Project a point onto the sphere and evaluate the sphere. |
|
Parameterization of the sphere surface as a tuple (U, V). |
Equals operator for the |
Import detail#
from ansys.geometry.core.shapes.surfaces.sphere import Sphere
Property detail#
- property Sphere.origin: ansys.geometry.core.math.point.Point3D#
Origin of the sphere.
- property Sphere.radius: pint.Quantity#
Radius of the sphere.
- property Sphere.dir_x: ansys.geometry.core.math.vector.UnitVector3D#
X-direction of the sphere.
- property Sphere.dir_y: ansys.geometry.core.math.vector.UnitVector3D#
Y-direction of the sphere.
- property Sphere.dir_z: ansys.geometry.core.math.vector.UnitVector3D#
Z-direction of the sphere.
- property Sphere.surface_area: pint.Quantity#
Surface area of the sphere.
- property Sphere.volume: pint.Quantity#
Volume of the sphere.
Method detail#
- Sphere.transformed_copy(matrix: ansys.geometry.core.math.matrix.Matrix44) Sphere #
Create a transformed copy of the sphere from a transformation matrix.
- Parameters:
- matrix
Matrix44
4X4 transformation matrix to apply to the sphere.
- matrix
- Returns:
Sphere
New sphere that is the transformed copy of the original sphere.
- Sphere.mirrored_copy() Sphere #
Create a mirrored copy of the sphere along the y-axis.
- Returns:
Sphere
New sphere that is a mirrored copy of the original sphere.
- Sphere.evaluate(parameter: ansys.geometry.core.shapes.parameterization.ParamUV) SphereEvaluation #
Evaluate the sphere at the given parameters.
- Parameters:
- parameter
ParamUV
Parameters (u,v) to evaluate the sphere at.
- parameter
- Returns:
SphereEvaluation
Resulting evaluation.
- Sphere.project_point(point: ansys.geometry.core.math.point.Point3D) SphereEvaluation #
Project a point onto the sphere and evaluate the sphere.
- Parameters:
- point
Point3D
Point to project onto the sphere.
- point
- Returns:
SphereEvaluation
Resulting evaluation.
- Sphere.parameterization() tuple[ansys.geometry.core.shapes.parameterization.Parameterization, ansys.geometry.core.shapes.parameterization.Parameterization] #
Parameterization of the sphere surface as a tuple (U, V).
The U parameter specifies the longitude angle, increasing clockwise (east) about
dir_z
(right-hand corkscrew law). It has a zero parameter atdir_x
and a period of2*pi
.The V parameter specifies the latitude, increasing north, with a zero parameter at the equator and a range of [-pi/2, pi/2].
- Returns:
tuple
[Parameterization
,Parameterization
]Information about how a sphere’s u and v parameters are parameterized, respectively.
- abstract Sphere.contains_param(param_uv: ansys.geometry.core.shapes.parameterization.ParamUV) bool #
Check a parameter is within the parametric range of the surface.
- abstract Sphere.contains_point(point: ansys.geometry.core.math.point.Point3D) bool #
Check a point is contained by the surface.
The point can either lie within the surface or on its boundary.