Digs,
I had a spreadsheet at one point in time that did exactly what you are trying to do. From memory, I remember the steps as being something along these lines:
1. Take the running cosine of all three datasets values
2. Multiply #1 by (PI()/rate)+PI()*1.1)
3. Multiply #2 by...