Is there a transformation matrix that can scale the x and / or y axes logarithmically?

I am using .net WPF geometry classes for graphing. I used matrix transformations to convert from the coordinate space of the screen to my coordinate space for the waveform. Everything works fine, and it’s very easy to keep track of my window and zoom, etc. I can even use the inverse transform to calculate the position of the mouse in terms of coordinate space. I use the built-in scaling and translation classes, and then a custom matrix to move along the y axis (there is no prefab matrix for flipping there). I want to be able to graphically display these waveforms on a logarithmic scale (either the x-axis, or the y-axis, or both), but I'm not sure if this is possible even with matrix transformation. Does anyone know if this is possible, and if so, what is a matrix?

+5
source share
2 answers

Matrices are linear transformations, so they can scale, rotate, etc. But they cannot be stretched logarithmically. This is a nonlinear transformation.

EDIT: But you should be able to overturn it yourself, without too much trouble. (Does not require knowledge of lin alg.) I mean, if you want the x axis to be on a logarithmic scale, take the x coordinate log that you draw with graphics . The tricky part is getting the scale legend to work on the side of the graph - it boils down to converting each scale value from x to 10 ^ x (or to any base of logarithms you use.)

, :

1     10    100   1000

1      2      3      4
+2

, , :

( log(x) / x        0      ) ( x )  =  ( log(x) )
(      0        log(y) / y ) ( y )  =  ( log(y) )

. .

0

All Articles