## half-circle

Ive been learning javascript and i cant get it to draw a half circle.
here is the code i came up with

&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;
Divisions in jscript
&lt;/TITLE&gt;
&lt;script language = "javascript"&gt;
var mx; //users x value
var my; //users y value
var mr; //users radius
var sy; //solve for y
var i; //for loops
var a; //misc. var
var b; //misc. var
var c; //misc. var
var d; //misc. var
sy = 1;
mx = 100;
my = 100;
mr = 30;
//draw a half circle using the equation y = sqrt(r^2-(x-j)^2-k^2); where (j, k) is the center of the circle
for (i = 100; i &lt; 131; i = i + 1)
{
a = Math.pow(mr, 2);
b = i - mx;
c = Math.pow(b, 2);
sy = a - c;
sy = Math.floor(Math.sqrt(sy) + my);
document.write("&lt;div id = m["+i+"] STYLE = 'POSITION: ABSOLUTE; TOP: "+sy+"; LEFT: "+i+";'&gt;&lt;img src = 'reddot.jpg'&gt;&lt;/DIV&gt;");
// document.write("a is "+a+"... b is "+b+"... c is "+c+"... d is "+d+"... sy is "+sy+"&lt;BR&gt;"); //this line may be used to see the value of each variable dependant on the loop
}
&lt;/script&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
does anyone see the problem???