Uneven Sine Curve I am not a mathematician, so apologies for my lack of knowledge/terminology.
For the day/night cycle in a video game, I'd like to use a sine wave to determine the lighting for the scene. (Where $X$ is the number of seconds elapsed)
For this graph, I'd like the maximum point to be $1$ and the minimum point to be $0$.
I'd like the full day/night to take $15$ minutes, or $900$ seconds. (So I believe that would be a "period" of $900$, though I'm not sure)
But this is where things get too complex for me. I'd like the night's duration to be half the day. In other words, the duration of the rise from $0.5$ to $1$ be twice the duration of the dip from $0.5$ to $0$.
Any help with this problem would be super appreciated by me and my team!
EDIT: I would like it to start at 1
 A: Yes, the period would be 900 seconds. Since your range is from 0 to 1, your amplitude is .5, and your midline is also .5.
Assuming no phase shift (you're starting at your midline as the sun is rising), the basic function you're going to use is $f(t)=a\sin(\frac{2\pi}{P}t)+m$, where $P$ is the period, $a$ is the amplitude, and $m$ is the midline. For now, we'll leave $P$ alone and say $a=m=.5$, so you have $f(t)=.5\sin(\frac{2\pi}{P}t)+.5$.
As has been suggested, a piecewise function is probably easiest. However, since there's two parts day for one part night, you need to have two thirds of period taken up by the first half of the cycle, and one third taken up by the second half of the cycle. This means four thirds of a full period for day, and two thirds for night.
You can do the intermediate calculations for yourself to check it if you want, but you end up with $D(t)=.5\sin(\frac{\pi}{600}t)+.5$ for the day and $N(t)=.5\sin(\frac{\pi}{300}t)+.5$ for the night. To get them to line up right, introduce a phase shift to the night function to get $N(t)=.5\sin(\frac{\pi}{300}t-2\pi)+.5$.
From here, I would recommend having the in-game time calculated on a repeating cycle so you can just define the domain of this function as $[0,900)$, and then it should work. To clarify, your time function looks like this:
$$
F(t) = \begin{cases}.5\sin(\frac{\pi}{600}t)+.5, t \in [0,600) \\
.5\sin(\frac{\pi}{300}t-2\pi)+.5, t\in [600, 900)
\end{cases}.
$$
Edit: I'm just now noticing you wanted to have it start at 1. In that case, just set the timer to start 300 seconds in.
A: The simplest way to do this is to take two sine waves, say $f$ and $g$, with $g$ having half the period of $f$, and piece them together accordingly:
Let the parameter $t$ be thought of as time, and $f(t)$ the brightness at time $t$. We will admit brightness between $-1$ and $1$, which can be converted as desired (e.g. height $-1 = 50$ lumens, and height $1 = 50,000$ lumens).
Let $f(t) = \sin(t)$, and $g(t) = -\sin(2t)$. Define a new function:
$$
F(t) = \begin{cases} f(t), & t \in [0,\pi], \\
g(t), & t\in [\pi,\frac{3\pi}{2}].
\end{cases}
$$
Notice that $f(\pi) = g(\pi) = 0$, so $F$ is continuous (as we might hope a brightness function in a video game to be). Moreover, $F$ can be copied side by side indefinitely, to form a new function which will be $\frac{3\pi}{2}$ periodic. To be technical, the function you really want is (where $n \in \mathbb{N}$):
$$
G(t) = \begin{cases} f(t-\frac{3\pi n}{2}), & t \in [\frac{3\pi n}{2},\frac{3\pi n}{2} + \pi], \\
g(t-\frac{3\pi n}{2}), & t\in [\frac{3\pi n}{2} + \pi, \frac{3\pi n}{2} + \frac{3\pi}{2}].
\end{cases}
$$
Below is an example of how it would look iterated over $2$ cycles:

