what will i have to do to the code below to see it working, also could someone comment the plotcircle function and emptycircle part to explain whats going on, thanks
code:--------------------------------------------------------------------------------
GraphPole = newArray(latitude,longitude);
GraphPole = [
[61.67,-71.75],
[61.67,-70.93],
[61.69,-70.28 ] ,
[61.69,-69.63]];
GraphEquat = newArray(latitude,longitude);
GraphEquat = [
[52.81,-71.57],
[52.82,-70.83],
[52.84,-70.0 8 ] ] ;
function degreesToRadians(a) {
return a*Math.PI/180.0;
}
function polarToCartesian(radius,lat,long) {
return {x:radius* Math.cos(lat)Math.cos(long),y:radiusMath.cos(latitude)*Math.sin(longitude) };
}
function plotCircle(radius,origin,a) {
for (var i=0;i<a.length;i++) {
var polar = a[ i ];
var cart =polarToCartesian(radius,degreesToRadians(polar[0]
),degreesToRadians(polar[1]));
cart.x += origin.x;
cart.y += origin.y;
if (i==0) {
moveTo(cart.x,cart.y);
saveFirst = cart;
} else {
lineTo(cart.x,cart.y);
}
}
moveTo(saveFirst.x,saveFirst.y); // close the circle
}
this.emptyMovieClip();
plotCircle(200,{x:200,y:200},GraphPole);
plotCircle(200,{x:200,y:200},GraphEquat);