translating object.getPosition to a radar in game

ok. The game is a space combat simulator. I can get the Position of an object, but i don’t know what maths to use to position this co-ordinate on a circle in the upper left of the screen.

I want it so that a white dot will be drawn in the center of the circle if the object is infront of you, and so that it appears at the very edge of the circle when the enemy is behind you.

This was used in wing commander prophecy i believe…

Any help or pushing me in the direction of help would be appreciated.

-Luke

Hello Abracsis

go here and download the ruby demo
There’s a radar script inside:

http://capsulemag.chez.tiscali.fr/Ruby/indexruby.htm

Bye
António