MbSphereSurface Spherical Surface

The MbSphereSurface class is declared in the surf_sphere_surface.h file.

The MbSphereSurface sphere belongs to the group of elementary surfaces MbElementarySurface. The sphere is described by the radius radius, defined in the local coordinate system 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 PointOn( double u, double v, MbCartPoint3D & s ) method, the position vector of the surface s is described by the vector function

\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:

../../../../_images/O.5.5.1.png

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.