You will probably have to code this yourself. I think you could do this by implementing the quadratic function of the bezier curve in the code, which can be found here . You decide how good you want the increments, solving only a few values. If you need a straight line, only allow for 0 and 1 and connect these points with the lines. If you need an example with one angle, solve for 0, 0.5 and 1 and connect the points in order. If you want your third example, solve for 0, 0.25, 0.5, 0.75 and 1. It is probably best to put it in a for loop like this:
float stepValue = (float)0.25; float lastCalculatedValue; for (float t = 0; t <= 1; t += stepValue) {
Edit: Actually, it looks like you want the line to go through a breakpoint. If so, you do not want to use a quadratic Bezier curve. Instead, you probably need a Lagrange curve. This site can help with the equation: http://www.math.ucla.edu/~baker/java/hoefer/Lagrange.htm . But in any case, you can use the same type of cycle to control the degree of smoothness.
2nd Edit: It seems to work. Just change the numberOfSteps member to the total number of line segments you want and set the array of points accordingly. By the way, you can use more than three points. It simply distributes the total number of line segments across them. But I initialized the array so that the result looks like your last example.
3rd Edit: I updated the code a bit so that you can left-click on the form to add points, and right-click to delete the last point. In addition, I added NumericUpDown at the bottom so you can change the number of segments at runtime.
public class Form1 : Form { private int numberOfSegments = 4; private double[,] multipliers; private List<Point> points; private NumericUpDown numberOfSegmentsUpDown; public Form1() { this.numberOfSegmentsUpDown = new NumericUpDown(); this.numberOfSegmentsUpDown.Value = this.numberOfSegments; this.numberOfSegmentsUpDown.ValueChanged += new System.EventHandler(this.numberOfSegmentsUpDown_ValueChanged); this.numberOfSegmentsUpDown.Dock = DockStyle.Bottom; this.Controls.Add(this.numberOfSegmentsUpDown); this.points = new List<Point> { new Point(100, 110), new Point(50, 60), new Point(100, 10)}; this.PrecomputeMultipliers(); } public void PrecomputeMultipliers() { this.multipliers = new double[this.points.Count, this.numberOfSegments + 1]; double pointCountMinusOne = (double)(this.points.Count - 1); for (int currentStep = 0; currentStep <= this.numberOfSegments; currentStep++) { double t = currentStep / (double)this.numberOfSegments; for (int pointIndex1 = 0; pointIndex1 < this.points.Count; pointIndex1++) { double point1Weight = pointIndex1 / pointCountMinusOne; double currentMultiplier = 1; for (int pointIndex2 = 0; pointIndex2 < this.points.Count; pointIndex2++) { if (pointIndex2 == pointIndex1) continue; double point2Weight = pointIndex2 / pointCountMinusOne; currentMultiplier *= (t - point2Weight) / (point1Weight - point2Weight); } this.multipliers[pointIndex1, currentStep] = currentMultiplier; } } } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); Point? previousPoint = null; for (int currentStep = 0; currentStep <= numberOfSegments; currentStep++) { double sumX = 0; double sumY = 0; for (int pointIndex = 0; pointIndex < points.Count; pointIndex++) { sumX += points[pointIndex].X * multipliers[pointIndex, currentStep]; sumY += points[pointIndex].Y * multipliers[pointIndex, currentStep]; } Point newPoint = new Point((int)Math.Round(sumX), (int)Math.Round(sumY)); if (previousPoint.HasValue) e.Graphics.DrawLine(Pens.Black, previousPoint.Value, newPoint); previousPoint = newPoint; } for (int pointIndex = 0; pointIndex < this.points.Count; pointIndex++) { Point point = this.points[pointIndex]; e.Graphics.FillRectangle(Brushes.Black, new Rectangle(point.X - 1, point.Y - 1, 2, 2)); } } protected override void OnMouseClick(MouseEventArgs e) { base.OnMouseClick(e); if (e.Button == MouseButtons.Left) { this.points.Add(e.Location); } else { this.points.RemoveAt(this.points.Count - 1); } this.PrecomputeMultipliers(); this.Invalidate(); } private void numberOfSegmentsUpDown_ValueChanged(object sender, EventArgs e) { this.numberOfSegments = (int)this.numberOfSegmentsUpDown.Value; this.PrecomputeMultipliers(); this.Invalidate(); } }