Space-filling sine I'm trying to have a sine wave of freq. b follow another sine wave of freq. a. Where the wave I'm wrapping follows the other's frenet frame. I'm looking to repeat this process with the frequency doubling and the amplitude halving for each successive sine. Unfortunately I can't even get the first one to follow due to my shoddy math skills. Could anyone show me the first wrap and explain the steps so I could continue for the others?
edit: In regards to the comment from Mark S...
What I'm trying to achieve is mapping the y-axis of sine B to the normal of a sine wave A. So they should have different frames (and hence different derivatives) since the first has a normal frenet frame for a sine but the second is accelerated by the first's frame (I think?). Basically if you bent a sine wave so it followed another sine wave (or an arbitrary curve). I don't think I understand what you mean by the second part.
 A: Disclaimer: This is definitely not what the OP was looking for, and was written in response to the original version of the question.
A sine wave of frequency $f$ could follow a function like $\sin(2\pi ft)$. At $1/f$, the end of the first period, it has height $0$ and derivative $2\pi f$. If we halve the amplitude and double the frequency, we get a function like $\frac12\sin(4\pi ft)$, which, at $1/f$, also has height $0$ and derivative $2\pi f$, so it will connect up just fine. It has a period of $1/(2f)$, and then we need a smaller sine function, etc. To figure out the general function, we need a way to figure out if $t$ is in $[0,1/f]$ or $[1/f,1/f+1/(2f)]=[1/f,3/(2f)]$ or $[3/(2f),7/(4f)]$, etc. $$\frac{2^{n}-1}{f2^{n-1}}<t<\frac{2^{n+1}-1}{f2^{n}}\Rightarrow2^{n+1}-2<2^{n}ft<2^{n+1}-1$$$$\Rightarrow-2<2^{n}ft-2^{n+1}<-1\Rightarrow2>2^{n}\left(1-2ft\right)>1$$$$\Rightarrow2^{1-n}>1-2ft>2^{-n}\Rightarrow1-n<\log_{2}\left(1-2ft\right)<-n$$$$\Rightarrow n-1<-\log_{2}\left(1-2ft\right)<n\Rightarrow n=\left\lceil-\log_2(1-2ft)\right\rceil$$where $\lceil\cdot\rceil$ is the ceiling function.
Therefore, if we define $\ell(t)=\left\lceil-\log_2(1-2ft)\right\rceil$, then the function we're looking for to put the waves together is $$\boxed{2^{1-\ell(t)}\sin\left(2^{\ell(t)}\pi ft\right)}$$ And on the interval $[0,2/f]$, this always has a graph that looks like:

