Tag Archives: Matrix

Find a matrix inverse in C#

This example finds a matrix inverse for a square matrix. The inverse of a matrix is another matrix that, when multiplied by the first, gives the identity matrix as a result. In the identity matrix, all entries are 0 except … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , | Leave a comment

Map drawing coordinates without distortion in C#

The post Easily map drawing coordinates in C# lets you easily map a rectangle in drawing coordinates to a rectangle in device coordinates. Often, however, you’ll want to ensure that the drawing area isn’t distorted. In other words, you don’t … Continue reading

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

Easily map drawing coordinates in C#

The example Map points between coordinate systems in C# shows several ways you can map drawing coordinates to screen coordinates. They all work but these sorts of coordinate conversions are really common if you’re doing more advanced graphics so I … Continue reading

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

Draw round circles in scaled coordinate systems in C#

In other posts I explain how you can use transformations to draw objects in a coordinate system other than the one provided “natively” by a PictureBox, Bitmap, and other objects that support drawing. Basically a transformation (represented by a Matrix … Continue reading

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

Map points between coordinate systems in C#

This example shows how you can easily map points between different coordinate systems. The Graphics object provides transformations that let you scale, translate, rotate, skew, and otherwise transform graphics as you draw them. One important use of these transformations is … Continue reading

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

Zoom on a graph with XAML code in C#

This example shows how you can zoom on a graph with XAML code only, without using C# code. (The program does use C# code to build the graph. It just doesn’t use any to zoom.) The example Zoom in on … Continue reading

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

Zoom on a graph in WPF and C#

It’s remarkably easy to zoom on a graph in WPF. This example extends the example Let the user click on graph points in WPF and C#. To modify the previous version, you first need to rebuild the user interface a … Continue reading

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

Let the user click on graph points in WPF and C#

This example shows how you can let a user click on graph points to display information about the data. (It extends the example Draw a graph with rotated text in WPF and C#.) When the user moves the mouse over … Continue reading

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

Draw a graph with rotated text in WPF and C#

This example shows how you can draw a graph with rotated text. The example Draw a graph with labels in WPF and C# has a DrawText method that makes adding text to a graph relatively easy. This example uses the … Continue reading

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

Draw a graph with labels in WPF and C#

This example shows how you can draw a graph with labels. The previous example Draw a graph with even tic marks in WPF and C# draws a simple graph. This example adds a title and labels to the X and … Continue reading

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