# Tag Archives: Matrix

## Test graphical transformations in C#

This example draws several pictures to let you test graphical transformations. The general approach is the same for each picture. The following section explains how the program draws the pictures that demonstrate the various graphical transformations. The sections after that … Continue reading

Posted in drawing, graphics, transformations | | Comments Off on Test graphical transformations in C#

## 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

## 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

## 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

## 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 | | Comments Off on Draw round circles in scaled coordinate systems in C#

## 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

## 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 | | Comments Off on Zoom on a graph with XAML code in C#

## 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

## 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

## 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