Formulating my div objects in such a way that it resembles a sine wave
<p>So the basic idea is that I have an array of 8 div rectangles with a width of 30 px and a random height through Math. rand. Right now I'm trying to arrange them such that they form a sine wave pattern. I know I have to use Math.sin somewhere, but I have no clue as to go about it. Any help with this issue will be greatly appreciated. Here is what I have so far:</p>

<pre><code>var divArr = new Array();

for(i = 0; i &lt; 8; i++){

 //var rand_numX = Math.floor((100-19)*Math.random()) + 20;
 var rand_numY = Math.floor((100-19)*Math.random()) + 20;
 divArr[i] = OS.dom.add_element('div', view, {position: 'absolute', width:'30px', height: rand_numY+'px', 'background-color': '#000000'});

 }
</code></pre>
