Finding periodic (trigonometric?) function given points It's been a while since I've taken a math class. 
I need a couple functions for a program I'm working on.  
I can tell they involve trigonometry, but I can't figure out how to derive the function given some points I know lie on the curve.  
Here are the points: 
degrees     x-axis force multiplier
    ----  | ----
      0   |  .5
      45  |   0
      90  |  -.5
     135  |  -1
     180  |  -.5
     225  |   0
     270  |  .5
     315  |   1
     360  |  .5

And another, similar function I would like to know how to figure out (in case you're feeling ambitious)
degrees     y-axis force multiplier
    ----  | ----
      0   |  .5
      45  |   1
      90  |  .5
     135  |   0
     180  |  -.5
     225  |  -1
     270  |  -.5 
     315  |   0
     360  |  .5

Thanks!
EDIT 
I want to clarify what I am actually attempting to do here in hopes that it will help me receive the best suggestions.  
The points I posted above are x vector and y vector ratios of a force, given that force's change in rotation from an arbitrary starting orientation.  
Let me put it another way: 
I have an arrow that can rotate.  I also have a force that I need to apply in the direction the arrow points.  So I need values for the x and y component of the force vector given the arrow's rotation.  
^ is 0x, 1y    (because it's vertical and up)
< is -1x, 0y   (because it's horizontal and left)
> is 1x, 0y    (because its horizontal and right)
etc.

So would a sawtooth function model it appropriately (as suggested below)?  I think linear will work but I want to be sure.  Thank you!
EDIT 2
Though the suggestion to use a Fourier series was very interesting and seemed to work well, it was merely imitating a 'sawtooth' plot: 

So the piecewise function (linear) seems the best way to model the data.  Thanks for all the help!
EDIT 3
For anyone who stumbles across this page in the future, I want to be clear that the way I'm modeling 2 dimensional force vectors in my program is not real-world accurate.  The "sawtooth" function works for me and my game, but is does not reflect actual physics.  
 A: For the first one, we could use
$$\cos(x+45^\circ)|\cos(x+45^\circ)|,$$
where angles are measured in degrees. For the second one we could play the same game with sines.
A: Edit: The answer below the line is, I think, a reasonable way to handle
the data given in the original format of the question. (These data are
repeated in the first couple of paragraphs below the line.)
However, I do not recommend using this approach if the function is
supposed to have something to do with the $x$ and $y$ components of 
a force after the force is rotated through an angle.
Instead, a better approach might be to use functions such as 
$\cos\left(\frac{\pi}{180}(x - 45)\right)$ and
$\sin\left(\frac{\pi}{180}(x - 45)\right)$.
These will not fit the data originally given, but
when multiplied by the original magnitude of a force they will result in
the $x$ and $y$ components of a
a force that is the same no matter which direction it is pointed.

The points $(0,0.5)$, $(45,0)$,  $(90,-0.5)$, and $(135,-1)$
all lie on the straight line described by
$$y = 0.5 - \frac{1}{90}x.$$
The points $(135,-1)$, $(180,-0.5)$, $(225,0)$, $(270,0.5)$, and $(315,1)$
all lie on the straight line described by
$$y = -1 + \frac{1}{90}(x - 135).$$
The simplest interpretation of the data you have given, it seems to me,
is as a "sawtooth" function, a sequence of straight
segments going up, then down, then up, then down again.
You may be able to manipulate trigonometric functions to somehow get what you
want, or at least to achieve the exact data points you have given.
For example, another answer gave a formula for a "wiggly"
function that passes through all these points,
but with various upward- and downward-curved segments between each pair
of points you specified.
It might be possible even to make a sawtooth function out of trigonometric
functions somehow, but for your purposes that does not seem worthwhile.
(It is bound to be a waste of computing power relative to simpler solutions.)
If a sawtooth function would be OK, I would recommend something like this:
let $x' = \text{fmod}(x + 45, 360)$,
where $\text{fmod}(a, b)$ is a function that returns a number $r$ such
that $r = a - qb$, $q$ is an integer, and $0 \leq r < b$.
Then let
$$
y = \begin{cases}
-1 + \frac{1}{90}x' & \text{if}\ x' \leq 180, \\
3 - \frac{1}{90}x' & \text{if}\ x' > 180.
\end{cases}
$$

Just for amusement (not a practical computing technique), here's a
way to define the same sawtooth function in a purely mathematical manner
using a trigonometric function:
$$ y = \frac{1}{90} \int_{45}^x
    \text{sgn}\left( \cos\left( \frac{\pi}{180} (t - 45) \right)\right) dt,
$$
where $\text{sgn}(\cdot)$ is the usual "signum" or "sign"  function.
A: $$
y = a\sin(x-45^\circ) + b \sin(3(x-45^\circ))
$$
This fits perfectly for the right values of $a$ and $b$.  My software says $a=-0.8536$ and $b=0.1464$.
A discrete periodic function can always be expanded as a Fourier series with only finitely many terms.  If you have software that does linear regression, just fit $a$ and $b$ by least squares.  I used the following commands in R:
y <- c(0.0, -0.5, -1.0, -0.5,  0.0,  0.5,  1.0,  0.5)
lm( y ~ sin(seq(0,7)*pi/4)+sin(seq(0,7)*pi*3/4))

The intercept is reported to be "1.685e-17", i.e. zero, and the coefficients of the two predictors are reported to be as stated above.  Then try this command:
anova(lm( y ~ sin(seq(0,7)*pi/4)+sin(seq(0,7)*pi*3/4)))

R then reports $5$ degrees of freedom for residuals and the sum of squares of residuals is reported at $0.00000$ (here it doesn't give me one of those silly looking microscopic numbers that say something times $10$ to the $-17$).
