In the sine and cosine equations, the amplitude is the coefficient (multiplier) of the sine or cosine. For example, the amplitude of y = sin x is 1. To change the amplitude, multiply the sine function by a number. Two graphs showing a sine function.
The sinusoidal axis and amplitude of a trig function graph. By multiplying a trigonometry function by certain values, you can make the graph taller or shorter: Positive values of amplitudes greater than 1 make the height of the graph taller. you multiply the height of the original sine graph by 2 at every point.
To conclude, when examining the graph y = a sin (bx + c), a affects the amplitude, b affects the period, and c affects the phase shift. If we add a fourth variable d, it affects the vertical change.
I've written a a little function that gives me out a value based on a sine wave when I put in a float between 0 and 1. I'm using it to lerp things around in a game.
public static class Utilities
{
public static float SineMe(float prop)
{
float output = (prop*180f)-90f;
output = Mathf.Sin(output*Mathf.Deg2Rad);
output = (output+1f)/2f;
return output;
}
}
It works fine.. But I was wondering is there a mathematical way of altering the sine wave so I can make it 'steeper' or 'shallower' in the middle? In the diagram below the blue curve is a sine wave, I'm wondering if I can make it more like the green line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With