I'm trying to create a sine function that will fit a geochron clocks day/night line. Right now I just started with a simple sine function, using map coordinates, which is this y=69sin(x-15)+2 but the peaks of the function should be flat which was not achieved with this function. Any advice on how to relatively easily transform the function to get this effect?
This is the online geochron clock that I was looking at http://www.fourmilab.ch/cgi-bin/Earth
You could just use min and max to cut off the function at the top and bottom. If $\alpha$ is the minimum value and $\beta$ the maximum then try
$$ y(x) = \min(\max(A\cos(k(x-x_0))+c,\alpha ) , \beta) $$
for appropriate values of $A$, $k$, $x_0$, $c$, $\alpha$, $\beta$, where \begin{gather} A>0 \\ k>0 \\ c-A<\alpha<\beta<c+A \end{gather} If you want the flat regions to all be the same length then you should have $$ c=\frac{\alpha+\beta} {2} $$ Note that I have used $\cos$ so that $x_0$ is solar noon.