I have made a simple script to test the feasibility of this idea, but it doesnt work.
#pragma strict
var originX = 0;
var originY = 0;
var altitude = 100;
var angle = 45;
var relativeX = 0;
var relativeY = 0;
function Start () {
}
function Update () {
if (angle < 90 && angle > 1)
{
relativeX = Mathf.Sin(angle) * altitude;
relativeY = Mathf.Cos(angle) * altitude;
transform.position = Vector3(relativeX + originX,0,relativeY + originY);
}
else
{
angle = 0;
}
angle = angle + 0;
}
I realize this wont work with angles outside 1 through 90, this was just a test, hence the check
the script will plot the object around the other, but it appears that every angle increment it adds 60°, and will somehow happily go above 90°, and well above 360°. the object also randomly disappears which i assume has something to do with bad scripting.
First as for your code above, you have the Sin() and Cos() reversed for your polar to rectangular conversion. Here is your script with a few changes. Start with an empty scene and attach it to a cube:
var speed = 0.001;
var originX = 0.0;
var originY = 0.0;
var altitude = 4.0;
var angle : float = 0.0;
function Update () {
var relativeX = Mathf.Cos(angle) * altitude;
var relativeY = Mathf.Sin(angle) * altitude;;
angle = (angle + speed * Time.deltaTime) % (2.0 * Mathf.PI);
transform.position = Vector3(relativeX + originX,0,relativeY + originY);
}
Note that the are significantly easier ways to orbit object in Unity. One is to use Transform.RotateAround().
Another way:

Place an empty game object at the center of rotation.

Place your object to orbit in orbit at the right altitude.

Make the object in orbit a child of the empty game object by dragging and dropping it on the empty game object.

Rotate the empty game object with a simple script. Just call this each frame:
transform.Rotate(Vector3(0,10 * Time.deltaTime, 0);