The post Draw a curve with varying tensions in C# uses the Graphics class’s DrawCurve method to draw a set of curves with different tensions.
While experimenting with that example, I tried drawing a curve with a negative tension, fully expecting the DrawCurve method to throw an exception. To my surprise, the method drew a curve and even produced the interesting result shown above. This example is similar to the previous one except it draws a single curve with tension -2.
The following code shows where the program draws its curve with negative tension.
//for (int t = 0; t <= 20; t += 2) for (int t = 20; t <= 20; t += 2) { pen.Color = Color.FromArgb(255 * t / 20, 0, 255 - 255 * t / 20); e.Graphics.DrawCurve(pen, Points.ToArray(), -t / 10f); }
The for loop loops over the single value 20, so it draws only one curve. Replace it with the commented out version to produce a set of curves with negative tension much like the previous example does. The picture on the right shows the result.



