Category Archives: mathematics

Draw arc wedges in C#

This example defines several extension methods that draw various interesting items including the one that I originally set out to draw: arc wedges. The extension methods let you easily draw arc wedges, arcs with tic marks, line segments with tic … Continue reading

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

Make an Apollonian gasket filled with images in C#

This example shows how to draw an Apollonian gasket filled with images of a cat. (I promise that this will be my last cat fractal for a while, although I may have one other cat image post coming up. ;-)) … Continue reading

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

Draw an image spiral in C#

This example lets you draw image spirals similar to the one shown above. This example lets you draw image spirals similar to the one shown above. It’s mostly just for fun, although it does include a useful exercise in graphics … Continue reading

Posted in drawing, graphics, image processing, mathematics | Tagged , , , , , , , , , , | Leave a comment

Find hexes a certain distance from a target hex in C#

My post Draw a hexagonal grid in C# shows how you can draw a grid made up of hexagons. This post shows how you can find the hexes that are a given distance N from a target hex. Basic Idea … Continue reading

Posted in algorithms, drawing, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , | Leave a comment

Let the user draw, move, and modify an arc in C#, Part 2

My previous post Let the user draw, move, and modify an arc in C#, Part 1 describes an Arc class that allows a program to draw arcs. This post explains how the example program uses that class to let the … Continue reading

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

Let the user draw, move, and modify an arc in C#, Part 1

The example See whether a point is above an arc in C# shows how you can find the part of an arc at a particular position. This example uses the techniques described in that one to allow the user to … Continue reading

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

See whether a point is above an arc in C#

This example shows how you can determine which part of an arc is at a particular position. If you move the mouse over the arc’s start or end point, the program changes its cursor to the PanWest and PanEast cursors. … Continue reading

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

Make a pie slice drawing extension in WPF and C#

This example shows how to make an extension method to draw a pie slice easily in WPF and C#. My post Make an intuitive extension method to draw an elliptical arc in WPF and C# shows how to make an … Continue reading

Posted in drawing, geometry, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , , | Leave a comment

Make an intuitive extension method to draw an elliptical arc in WPF and C#

In my previous post Draw an elliptical arc in WPF and XAML, I explained how WPF makes you define an elliptical arc. Their method almost makes sense if you want draw an arc as part of a path. however, if … Continue reading

Posted in drawing, geometry, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , | 2 Comments

Draw an elliptical arc in WPF and XAML

This example shows how to use XAML code to draw an elliptical arc in a WPF. The following sections explain how to specify an elliptical arc and how to draw one in XAML. Specifying an Elliptical Arc WPF provides several … Continue reading

Posted in drawing, geometry, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , | Leave a comment