I want to generate a sine signal in C without using the standard function sin() in order to trigger sine shaped changes in the brightness of a LED. My basic idea was to use a lo
Have you considered modelling the portion of the sine curve from [0..PI] as a parabola? If the brightness of the LED is only intended to be observed by a human eye, the shapes of the curves ought to be similar enough so that little difference would be detected.
You would just need to figure out the appropriate equation to describe it.
Hmmm, ...
Vertex at (PI/2, 1)
X-axis intersections at (0, 0) and (PI, 0)
f(x) = 1 - K * (x - PI/2) * (x - PI/2)
Where K would be ...
K = 4 / (PI * PI)