The derivative of is
The derivative is equal to 0 for and
If you need to control the peak, for instance have the peak at a given value then you have to chose k such that
I'm afraid I'm a bit of a math cosumer more than a mathametician & I would be very indepted if someone could show me a formula.
I'm working on a computer-graphics application and I need to fade a value non-linearaly over the range of 0 to 1. Where Y = 0 at 0, and Y = 0 at 1, and Y = 1 somewhere in between. Beyond X= 0 and X= 1 it will be clipped, so I don't care what Y is beyond those values.
The graph in this image is Y = sin(x^K * 3.14156) which has the basic shape I'm after, but would like more control over the slopes on the left and right of the peak, and the placement of the peak. (despite the values on the X axis, the interval of X is 0 - 1.
All the best,
Many thanks! makes perfect sense once I look at it. The curve will start at 0 and peak when x^K*pi = radians(90) won't it, so I'd just adjust K to determine at what value of X I hit .5 pi.
Is there anything (simple) you can see that can modify the slopes on either side or will I have to investigate bezier curves & the like?
( this is going into a real time shader in a video game, so it needs to be relatively computationaly inexpensive )
Many thanks again,
Yes, if you look at the picture here I'd ideally want near-independent control of the peak and the deflection of the curve from each of the black lines on the up & down side (e.g., be able to move the red curve up to be the orange etc..)
If I have well understood you would like to have the peak at the same place (not moving) and move the the red curve up to the orange one.
This is not feasible with a simple function like because as we saw before the position of the peak determines the value of k and therefore Y function.
There should be something more like