ArcObjects Library Reference (Geometry)  

IBezierCurve.QueryInflectionPoint Method

Finds inflection point; sets it empty if none exists.

[Visual Basic .NET]
Public Sub QueryInflectionPoint ( _
    ByVal inflectionPoint As IPoint _
)
[C#]
public void QueryInflectionPoint (
    IPoint inflectionPoint
);
[C++]
HRESULT QueryInflectionPoint(
  IPoint* inflectionPoint
);
[C++]

Parameters

inflectionPoint

  inflectionPoint is a parameter of type IPoint

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Returns the first Inflection Point of the Bezier Curve, or returns an Empty Point if no Inflection Point Exists.  An Inflection Point occurs where the sign of the Curvature changes.

Remarks

Most Bezier Curves have 0 or 1 Inflection Points, but a few constructions result in Bezier Curves with 2 Inflection Points.  For these Bezier Curve, the only way to find both Inflection Points is to Reverse the Orientation of the Bezier Curve and call QueryInflectionPoint a second time.  If the Inflection Points are not equal, the Bezier Curve has two Inflection Points, otherwise, it only has a single Inflection Point.

BezierCurve QueryInflectionPoint Example

[C#]

    private void QueryInflectionPoint()
    {
        //Control points
        IPoint[] controlPoints = new IPoint[4];
        //Bezier FromPoint / From Tangent FromPoint
        controlPoints[0] = new ESRI.ArcGIS.Geometry.Point();
        //From Tangent ToPoint
        controlPoints[1] = new ESRI.ArcGIS.Geometry.Point();
        //To Tangent FromPoint
        controlPoints[2] = new ESRI.ArcGIS.Geometry.Point();
        //Bezier To Point / To Tangent ToPoint
        controlPoints[3] = new ESRI.ArcGIS.Geometry.Point();
        //Define the Bezier Control Points.  This is a simple S-Curve.
        controlPoints[0].PutCoords(100, 100);
        controlPoints[1].PutCoords(150, 200);
        controlPoints[2].PutCoords(250, 0);
        controlPoints[3].PutCoords(400, 100);
        IBezierCurveGEN bezierCurve = new BezierCurve();
        bezierCurve.PutCoords(ref controlPoints);
        //Report control Point
        IPoint[] outControlPoints = new IPoint[4];
        for (int i = 0; i < controlPoints.Length; i++)
        {
            outControlPoints[i] = new ESRI.ArcGIS.Geometry.Point();
        }
        bezierCurve.QueryCoords(ref outControlPoints);
        String report = "Control Points \n";
        for (int i = 0; i < outControlPoints.Length; i++)
        {
            report = report + outControlPoints[i].X + " , " + outControlPoints[i].Y + " \n";
        }
        IPoint infelctionPoint = new ESRI.ArcGIS.Geometry.Point(); ;
        bezierCurve.QueryInflectionPoint(infelctionPoint);
        report = report + "Inflection Point : " + infelctionPoint.X + " , " + infelctionPoint.Y;

        System.Windows.Forms.MessageBox.Show(report);
    }

See Also

IBezierCurve Interface