Tag Archives: smooth curve

Draw an improved heartagram in C#

My previous post Draw a heartagram in C# uses a smooth curve to draw the curved part of a heartagram. The result is pretty good, but if you look closely you’ll see that its edges curve in to the shape’s … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , | Leave a comment

Draw a heartagram in C#

The heartagram is a symbol created by vocalist Ville Valo and used by the band HIM. I’m not particularly a fan, but I think the heartagram shape is interesting so I wanted to make one with a C# program. The … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , | 1 Comment

Let the user draw a smooth curve with WPF and C#

This example combines techniques used by the following examples. Draw a smooth curve in WPF and C# Let the user draw a smooth curve in C# The program uses the following code to keep track off what it is doing … Continue reading

Posted in drawing, graphics, wpf | Tagged , , , , , , , , | 2 Comments

Draw a smooth closed curve in WPF and C#

The post Draw a smooth curve in WPF and C# explains how you can create a series of Bézier curves to smoothly connect a group of points. This example shows how to modify that one to create a smooth closed … Continue reading

Posted in drawing, graphics, wpf | Tagged , , , , , , , , , , , | Leave a comment

Draw a smooth curve in WPF and C#

In Windows Forms programming, you can draw a smooth curve by using the Graphics object’s DrawCurve method. For some reason, Microsoft did not provide the ability to draw a smooth curve in WPF. Fortunatrely, you can use a series of … Continue reading

Posted in drawing, graphics, wpf | Tagged , , , , , , , , , | 2 Comments

Let the user draw a smooth curve in C#

This example lets the user click points to draw a smooth curve. When the user clicks the left mouse button, the program adds a point to the curve. When the user clicks the right button, the program stops drawing the … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , | 2 Comments

See if the mouse is over a curve in C#

The post Draw a smooth curve connecting points in C# uses the Graphics class’s DrawCurve method to draw a smooth curve that connects a collection of points. This example shows how you can tell when the mouse is over the … Continue reading

Posted in algorithms, drawing, graphics | Tagged , , , , , , , , , , , , | 1 Comment

Draw a curve with negative tension in C#

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 … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , , | Leave a comment

Draw a curve with varying tensions in C#

The example Change tension for a smooth curve in C# shows how to use the Graphics class’s DrawCurve draw method to draw a smooth curve connecting a sequence of points. The method’s tension parameter lets you change how directly the … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , , | 1 Comment

Change tension for a smooth curve in C#

The post Draw a smooth curve connecting points in C# explains how you can use the Graphics class’s DrawCurve method to draw a smooth curve that connects a sequence of points. It uses the following code. e.Graphics.DrawCurve(Pens.Red, Points.ToArray()); This example … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , , , , | Leave a comment