Category Archives: mathematics

Animate maze solving, version 3

The previous maze-solving examples Animate maze solving, version 1 and Animate maze solving, version 2 used a recursive method named Solve that returns an IEnumerable containing the paths that the program was searching. Removing Recursion To remove the recursion, think … Continue reading

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

Animate maze solving, version 2

My earlier post Animate maze solving, version 1 uses a method that returns an enumeration to show the steps used to find a path through a maze. That method works but it uses a loop that includes calls to Thread.Sleep … Continue reading

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

Animate maze solving, version 1

The post Solve mazes in C# solves mazes very quickly, but it only shows you the final path from the start point to the end point. It might be nice to make a program to animate maze solving so you … Continue reading

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

Solve mazes in C#

This example shows how to solve mazes that were created by the example Make and draw a maze in C#. See that example for information about how to build a maze. Read the following sections to learn how to solve … Continue reading

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

Draw an image circle in C#

This example is somewhat similar to the post Draw an image spiral in C# except it draws an image circle instead of an image spiral. The key is the DrawImageCircle method, which draws a smaller image in a circle on … Continue reading

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

Arrange images on the corners of a polygon in C#

This post shows a way to arrange images on top of a background image as shown in the image above. How to Use the Program Enter the names of the background and foreground image files, or use the File menu’s … Continue reading

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

Let the user draw rotated skewed polygons in C#

The example Let the user draw rotated polygons with right angles in C# draws polygons with edges that are parallel or perpendicular to a baseline. This example is very similar except its polygons have edges that are parallel to one … Continue reading

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

Let the user draw rotated polygons with right angles in C#

This example lets the user draw rotated polygons where all edges are either parallel or perpendicular to a defined baseline direction. As a result, all of the polygon’s angles are right angles. (And yes, I know that the polygons aren’t … Continue reading

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

Draw interlocked circles in C#

This example draws a set of interlocked circles so they alternate between above and below each other. As you can see from the picture, the circles are made up of colored lines with black outlines so it’s easy to see … Continue reading

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

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