Plotting points on a circle, like a radar

I’ve been working with this one code for a while now that plots points in a circle where the center of the circle is today’s date and the out edge is 2 or 3 years out. The code places each point the correct distance from center randomly around the center point. It’s been working great, but now my boss wants to see the circle split into 4 quadrants. Now the points need to be within one of the quads dependant on two variables (area & port). I think the easiest way to explain it is that the circle is cut up like –

Top half = application
Bottom half = infrastructure
Left half = global wide
Right half = area wide

The math is really too far over my head at this point, so I’m hoping someone has the knowledge to help out with this.

If you put the code on the first frame and add a circle MC to the stage, call it myCircle, and have a point in your library with the id myPoint you can run this to see it work

circle = myCircle;
pointer = 'myPoint';
years = 2;
dates = [new Date(2008, 1, 1), new Date(2008, 1, 1), new Date(2008, 1, 1), new Date(2008, 2, 26), new Date(2008, 1, 1), new Date(2009, 1, 1)];
dates2 = [{date:new Date(2008, 1, 1), area:"global", port:"application"}, {date:new Date(2007, 12, 1), area:"area", port:"application"}, {date:new Date(2008, 11, 1), area:"global", port:"infrastructure"}, {date:new Date(2007, 11, 1), area:"area", port:"application"}];
counter = 0;
today = new Date();
edge = new Date(today.getFullYear()+2, today.getMonth(), today.getDate(), today.getHours(), today.getMinutes(), today.getSeconds(), today.getMilliseconds());
pdates = dates2.slice(0);
plotter = setInterval(plotPoints, 100);
function plotPoints() {
	var cIndex = random(pdates.length);
	var cDate = pdates[cIndex].date;

	pdates.splice(cIndex, 1);
	var percentage = (today.getTime()-cDate.getTime())/(today.getTime()-edge.getTime());
	var dist = circle._width/2*percentage;
	var angle = random(360);
	//var angle = random(90);
	//var angle = Math.round(Math.random() * (90 - 45 + 1)) + 45;
	trace ("angle " + angle);
	var myNumber = angle/2;
	var rads = angle/(Math.PI/180);
	//var rads = angle/(Math.PI/myNumber);
	trace ("rads " + rads);
	var sin = Math.sin(rads);
	trace ("sin " + sin);
	var cos = Math.cos(rads);
	trace ("cos " + cos);
	var y = sin*dist;
	var x = cos*dist;
	trace (y + "y  x" + x + "
");
	var centerX = (circle.getBounds(circle._parent).xMin+circle.getBounds(circle._parent).xMax)/2;
	var centerY = (circle.getBounds(circle._parent).yMin+circle.getBounds(circle._parent).yMax)/2;
	//trace(centerX + "  " + centerY);
	cPoint = circle._parent.attachMovie(pointer, 'point'+(++counter), circle._parent.getNextHighestDepth(), {_x:centerX+x, _y:centerY+y, date:cDate});
	//
	//
	cPoint.onRollOver = function() {
		_root.createTextField('tooltip', _root.getNextHighestDepth(), _root._xmouse, _root._ymouse, 0, 0);
		_root.tooltip.border = true;
		_root.tooltip.background = true;
		_root.tooltip.backgroundColor = 0xFFFFCC;
		_root.tooltip.selectable = false;
		_root.tooltip.autoSize = 'left';
		_root.tooltip.text = y+ " y    x " + x;
		cPoint.onEnterFrame = function() {
			_root.tooltip._y = _root._ymouse-_root.tooltip._height;
			_root.tooltip._x = _root._xmouse;
			updateAfterEvent();
		};
	};
	//
	//
	cPoint.onRollOut = function() {
		_root.tooltip.removeTextField();
		delete this.onEnterFrame;
	};
	//
	cPoint.onPress = function() {
		_root.drawMyLines();
	};
	//
	if (pdates.length == 0) {
		clearInterval(plotter);
	}
	//
}