Hi,

Disclaimer: I feel stupid about not remembering this...

I'm currently trying to create an algorithm for a project I'm working on, and I'm stuck with a stupid noob highschool maths question.

Essentially, I'm creating a system as a sphere, and I'm dividing it amongst players.

To do this, I take the 360 degrees and split them by the amount of players.

ex: 1 player (has the whole 360 degrees), 2 players (each have 180 degrees), etc (see examples below)

That works great.

Now, I'm trying to put objects at a random x,y position into a specific player's 'zone of influence'.

Since I know that a player owns a specific arc (for example, player one will have from 0 degrees up to 360/amount of players), I know the range of degrees I can use for limits.

However, I'm somehow not able to remember how to trace that line (the relationship in increments of x and y that extrapolates from a specific degree).

I feel especially dumb since I realize that at 45 degrees, the increase in x and y is the same, but I can't explain it.

Anybody can remind me of how this works, or send me an article?

I feel ashamed that I can remember matrices and limits, but not this... I know its related to Sin and Cos, but I'm not sure how to do the math.

**Edited by Orymus3, 31 August 2013 - 12:01 PM.**