I'm taking data from a plot of a 2D line drawing and trying to plot it on a piece of paper of a given size. (The paper size can change) To make the line drawings fit on the paper, I need to scale it. Unfortunately, some of the legs on this plot are very short, and some are extremely long, so a simply linear scale results in areas too small to see with a single line often taking up half the paper. I'm trying to use logarithmic scaling to compensate for this, so the entire drawing is on the piece of paper and the longest lengths are attenuated more than the shortest lengths. I just can't seem to wrap my head around the math here. If I can understand the math, I can translate that into the C++ code I need.
I've looked here: Convert Linear scale to Logarithmic
And here: https://math.stackexchange.com/questions/970094/convert-a-linear-scale-to-a-logarithmic-scale
The basics:
I need to convert linear x,y values into logarithmic values ranging from 1-paperWidth and from 1-paperHeight.
My x and y values will always be positive and will range from x-min to x-max, and y-min to y-max.
Can someone dumb down this math for me?
I would REALLY appreciate it!