.. role:: blue :class: blue MbSilhouetteCurve Silhouette Curve ================================== .. _MbSilhouetteCurve_Silhouette_Curve_: .. kernel version: The :blue:`MbSilhouetteCurve` class is declared in the *cur_silhouette_curve.h* file. A silhouette curve of a surface MbSilhouetteCurve is a derived class of a curve on surface :ref:`MbSurfaceCurve `. A silhouette curve is defined by a surface :ref:`MbSurface ` **surface**, a two-dimensional curve :ref:`MbCurve ` **curve** in the surface parameter space, a Boolean flag of curve periodicity **closed**, a Boolean flag of perspective *perspective*, a view vector **eye**, and the curve type **species**. The curve also contains some additional data that is not mandatory and is used to speed up the work of the curve methods. A silhouette curve is a curve on the surface *surface* that separates the part of the surface visible from the observation point from the part of the surface invisible from the observation point. If *perspective = true*, then the observation point is defined by the view vector **eye**. If *perspective = false*, then the observation point is located at infinity and the view vector *eye* defines the direction from the observation point to the surface. The normal of the surface *surface* at the silhouette curve is orthogonal to the straight line connecting this point on the surface with the observation point. In the particular case when an exact silhouette curve of the surface can be constructed, the curve type *species* takes the value *cbt_Ordinary*. For example, for a sphere the silhouette curve is a circle. In the particular case, an exact spatial curve *exactCurve* is constructed, which exactly describes the silhouette of the surface and is used to calculate the radius vector of the silhouette curve and its derivatives. In the general case, the curve type *species* takes the value *cbt_Specific*, the two-dimensional curve *curve* is a spline and approximates the silhouette of the surface. In the general case, a point of the silhouette curve is calculated by an iterative method that uses the two-dimensional curve *curve* as an initial approximation. The parameter domain of the silhouette curve of the surface coincides with the parameter domain of the two-dimensional curve *curve*. In the :blue:`PointOn`\( double & *t*, :blue:`MbCartPoint3D` & *r* ) method, the radius vector of the curve *r* is described by the vector function .. math:: \mathbf{r}(t) = \mathbf{surface}(u, v), where *u*, *v* are the coordinates of a two-dimensional point whose initial approximation is calculated by the *curve* → :blue:`PointOn`\( *t*, *point* ) method, *u = point.x*, *v = point.y*. Then the parameters *u* and *v* are refined by an iterative method that uses the equation .. math:: \mathbf{vector}\cdot\mathbf{n}(u, v) = 0, where *n(u, v)* is the surface normal that is calculated by the *surface* → :blue:`Normal`\( *u, v*, *n* ) method, and **vector** is the view vector (for an observation point at infinity **vector** = **eye**). A silhouette curve of a torus surface is shown in Fig. 1: .. figure:: /MODELER/CURVES/pictures/O.4.21.1.png :width: 9cm :align: center Fig. 1 A silhouette curve of the torus surface from another direction is shown in Fig. 2: .. figure:: /MODELER/CURVES/pictures/O.4.21.2.png :width: 9cm :align: center Fig. 2 When crossing the silhouette curve, the scalar product of the surface normal vector and the view vector changes sign. A silhouette curve is always either closed or starts and ends at the surface boundaries. A silhouette curve is used to construct projections of the silhouette of a curvilinear surface onto a plane.