Tag Archives: mathematics

Fill a target area found by trilateration in C#

The post Perform trilateration in C# explains how a C# program can use trilateration to find an area where a target point lies. This post explains how you can draw that area. The Target Area The target area found by … Continue reading

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

Perform trilateration in C#

This post explains how a C# program can use trilateration to locate a point that is known distances from three other points. Trilateration is somewhat similar to triangulation, so following two sections begin by explaining what triangulation and trilateration are. … Continue reading

Posted in algorithms, geometry, mathematics | Tagged , , , , , , , , | 1 Comment

Draw many circles that intersect two points in C#

As I mentioned in my earlier post Connect two points with elliptical arcs in C#, an infinite number of circles (or ellipses) can pass through two points. This example draws some of them to produce an interesting pattern. This example … Continue reading

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

Connect two points with elliptical arcs in C#

As I mentioned in my earlier post Connect two points with arcs of midpoint circles in C#, two points alone cannot uniquely define a circle. An infinite number of circles (or ellipses) can pass through two points and therefore they … Continue reading

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

Connect two points with arcs of midpoint circles in C#

Two points alone cannot uniquely define a circle because an infinite number of circles can pass through two points and therefore they can be connected by an infinite number of arcs. If you add extra information, however, two points can … Continue reading

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

Find the angle between two vectors in C#

This example shows how you can find the angle between two vectors. The program has three main parts: selecting the points that define the vectors, drawing the vectors, and calculating the angle between them. The last task is the most … Continue reading

Posted in algorithms, geometry, mathematics | Tagged , , , , , , , , , , | 1 Comment

Create a schedule for a round robin tournament with home teams in C#

My book Essential Algorithms, Second Edition describes an algorithm for creating a round robin schedule in detail. The following posts also explain how you can create a round robin schedule in slightly less detail. Generate a schedule for a round … Continue reading

Posted in algorithms, combinatorics, mathematics | Tagged , , , , , , , , , , , | Leave a comment

Understand bitwise operators in C#

The examples Make an efficient priority queue class in C#, Part 1 and Make an efficient priority queue class in C#, Part 2 explain how to make a heap-based priority queue. Those examples use a FindMsb method that uses bitwise … Continue reading

Posted in algorithms, mathematics | Tagged , , , , , , , , , , , | 3 Comments

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