You are wanting to divide your 4095 to 50 interval into 25 equal segments (26-1). That would mean the width of each "intensity segment" is:
(4095-50)/25 = 161.8
So if variable x
is ranging 1 to 26, your equation for distance would be:
D = sqrt( 1 / (4095 - (x * 161.8)) )
This is from taking Intensity_value = 1/D^2
as the proportion (I say "intensity value" since this doesn't include the proportion constant if it were a real intensity - we're dealing with arbitrary units for this problem).
In other words, if you plotted x
on a line and each x
value was a distance D
from the origin, you'd get the result you are showing for 1
through 26
. I am assuming, from your diagram, that the intensity is DECREASING as you go to the right.
You should be able to generalize this for different ranges of intensities and different ranges of corresponding x
.