private void DragGBSplineLeftDerivation(MouseEventArgs e)
        {
            var yCursorPosition = CursorPositionY(e);

            _selectedEllipse.SetValue(Canvas.TopProperty, yCursorPosition);

            var degree = _selectedGlobalBSpline.Degree;
            var yCursorPositionInWA = TransformCoordinates.PlotAreaToWorldAreaY(yCursorPosition + H_DIV_2, _plotArea, _worldArea);
            var xCursorPositionInWA = _selectedGlobalBSpline.Knots[degree] - SplineDrawer.DERIVATIVE_AUX_KNOT_DISTANCE;
            var xCursorPosition     = TransformCoordinates.WorldAreaToPlotAreaX(xCursorPositionInWA, _plotArea, _worldArea);

            _selectedGlobalBSpline.LeftDerivation = MathOperations.DirectionOfLinearFunction(xCursorPositionInWA, yCursorPositionInWA, _selectedGlobalBSpline.Knots[degree], _selectedGlobalBSpline.FunctionValues[0]);
            _dragInfoLabel.WriteAndSetCoordinates(_selectedGlobalBSpline.LeftDerivation, xCursorPositionInWA, yCursorPositionInWA, xCursorPosition + AVOID_CURSOR_X, yCursorPosition + H_DIV_2);
            _dragInfoLabel.Visibility = Visibility.Visible;

            _canvasUtilities.RefreshGlobalBSplineInCanvas(_selectedGlobalBSpline, canvas1, _engine);
        }
        private void DragCSplineLeftDerivation(MouseEventArgs e)
        {
            var cursorPositionY = CursorPositionY(e);

            _selectedEllipse.SetValue(Canvas.TopProperty, cursorPositionY);


            var yCursorPositionInWA = TransformCoordinates.PlotAreaToWorldAreaY(cursorPositionY + H_DIV_2, _plotArea, _worldArea);
            var xCursorPositionInWA = _selectedClampedSpline.Knots[0] - SplineDrawer.DERIVATIVE_AUX_KNOT_DISTANCE;
            var xCursorPosition     = TransformCoordinates.WorldAreaToPlotAreaX(xCursorPositionInWA, _plotArea, _worldArea);

            _selectedClampedSpline.Derivations[0] = MathOperations.DirectionOfLinearFunction(xCursorPositionInWA, yCursorPositionInWA, _selectedClampedSpline.Knots[0], _selectedClampedSpline.ControlPoints[0]);
            _dragInfoLabel.WriteAndSetCoordinates(_selectedClampedSpline.Derivations[0], xCursorPositionInWA, yCursorPositionInWA, xCursorPosition + AVOID_CURSOR_X, cursorPositionY + H_DIV_2);
            _dragInfoLabel.Visibility = Visibility.Visible;

            _canvasUtilities.RefreshClampedSplineInCanvas(_selectedClampedSpline, canvas1, _engine);
            // }
        }
        private void DragHSplineDerivation(MouseEventArgs e)
        {
            var yCursorPosition = CursorPositionY(e);

            _selectedEllipse.SetValue(Canvas.TopProperty, yCursorPosition);
            var yCursorPositionInWA = TransformCoordinates.PlotAreaToWorldAreaY(yCursorPosition, _plotArea, _worldArea);
            var xCursorPositionInWA = _selectedHermiteSpline.Knots[_changedPointIndex] - SplineDrawer.DERIVATIVE_AUX_KNOT_DISTANCE;

            _selectedHermiteSpline.Derivations[_changedPointIndex] =
                MathOperations.DirectionOfLinearFunction(xCursorPositionInWA, yCursorPositionInWA, _selectedHermiteSpline.Knots[_changedPointIndex], _selectedHermiteSpline.ControlPoints[_changedPointIndex]);

            var selectedKnotPositionInPA = TransformCoordinates.WorldAreaToPlotAreaX(_selectedHermiteSpline.Knots[_changedPointIndex], _plotArea, _worldArea);

            _dragInfoLabel.WriteAndSetCoordinates(_changedPointIndex, _selectedHermiteSpline.Derivations[_changedPointIndex], xCursorPositionInWA, yCursorPositionInWA, selectedKnotPositionInPA + AVOID_CURSOR_X, yCursorPosition + H_DIV_2);
            _dragInfoLabel.Visibility = Visibility.Visible;

            _canvasUtilities.RefreshHermiteSplineInCanvas(_selectedHermiteSpline, canvas1, _engine);
        }