.. role:: blue :class: blue MbSphereSurface Spherical Surface =================================== .. _MbSphereSurface_Spherical_Surface_: .. версия ядра: 1180ХХ The :blue:`MbSphereSurface` class is declared in the *surf\_sphere\_surface.h* file. The :blue:`MbSphereSurface` sphere belongs to the group of elementary surfaces :blue:`MbElementarySurface`. The sphere is described by the radius *radius*, defined in the local coordinate system :ref:`MbPlacement3D ` **position**. The first surface parameter is measured along the arc from the vector **position.axisX** in the direction of the vector **position.axisY**. The first surface parameter *u* takes values on the interval: *umin* ≤ *u* ≤ *umax*. The values *u* = 0 and *u* = 2π correspond to a point on the XZ plane. The surface can be periodic with respect to the first parameter. For a periodic surface, *umax* - *umin* = 2π; for a non-periodic surface, *umax* - *umin* < 2π. The second surface parameter is measured along the arc from the XY plane of the local coordinate system of the surface in the direction of the vector **position.axisZ**. The second surface parameter *v* takes values on the interval: *vmin* ≤ *v* ≤ *vmax*. The value *v* = 0 corresponds to a point on the XY plane of the local coordinate system of the surface. The surface is non-periodic with respect to the second parameter. In the :blue:`PointOn`\( double *u*, double *v*, :blue:`MbCartPoint3D` & **s** ) method, the position vector of the surface **s** is described by the vector function .. math:: :nowrap: \begin{equation} \mathbf{s}(u, v) = \mathbf{position.origin} + \mathit{radius} \left( \cos(u)\, \mathbf{position.axisX} + \sin(u)\, \mathbf{position.axisY} \right) + \mathit{radius} \cdot \sin(v)\, \mathbf{position.axisZ} \end{equation} Fig. 1 shows the sphere: .. figure:: /MODELER/SURFACES/pictures/O.5.5.1.png :width: 15cm :align: center Fig. 1 The sphere radius must be greater than zero: *radius* > 0. The sphere has poles at parameter values *v* = π/2 and *v* = -π/2. The following inequalities must hold for the boundary parameters of the surface: *umin* < *umax*, *vmin* < *vmax*, *vmax* ≤ π/2, *vmin* ≥ -π/2. The local coordinate system **position** can be either right-handed or left-handed. If the local coordinate system is right-handed, the normal is directed outward from the sphere; if the local coordinate system is left-handed, the normal is directed inward into the sphere.