title: Adjust values non linear
body: <p>I have a list of value pairs describing the distance to a given pixel and the brightness in percent I want to set:</p>
  
  <pre><code>Distance    Brightness
  0px         100%
  1px         99%
  2px         98%
  3px         97%
  etc.
  </code></pre>
  
  <p>I want to transform my values so that the Brightness values form some kind of curve. The closer Values (up to 10px) are between 100-95 maybe and the rest will decrase more fast.</p>
  
  <p><img src="https://i.stack.imgur.com/OwRh1.jpg" alt="enter image description here"></p>
  
  <p>First row is the linear one I already have, the second one my goal.</p>
  
  <p>Another example, what I want to achieve:
  What I have now:</p>
  
  <p><img src="https://i.stack.imgur.com/lyQkM.jpg" alt="enter image description here"></p>
  
  <p>What I want to have:</p>
  
  <p><img src="https://i.stack.imgur.com/POFm3.jpg" alt="enter image description here"></p>
  
  <p>I am programming a brighten-brush. As you can see the brightness is linear. I want it to become brighter in the middle of the circle and a greater "fall off" to the circle edges.</p>
  
  <p>Code example to calculate the distance of the pixel and the brightness value</p>
  
  <pre><code>    private static Color LightenPixel(Vector2f center, Vector2f pixel, Color color)
      {
          //Calculate distance to circle origin
          double x = Math.Pow((double)(center.X - pixel.X),2);
          double y = Math.Pow((double)(center.Y - pixel.Y), 2);
          double distance = Math.Sqrt(x + y);
  
          //Get the percentual distance to the origin and flip the percentual value
          // E.G. 80% becomes 20% for brightness =&gt; closer to origin =&gt; brighter
          // -1 = 100% Darkness
          // +1 = 100% Brightness
          float brightness = (float)(1 - (distance * 100 / radius) / 100);
          return ChangeColorBrightness(color, brightness);
      }
  </code></pre>
  
  <p>EDIT:
  Another example on how I want it:</p>
  
  <p><img src="https://i.stack.imgur.com/l9bvt.jpg" alt="enter image description here"></p>
  
  <p>Red is what I have, green is how I want it (somehow).</p>