The inverse of a spherical coordinate can be calculated by taking the inverse of the latitude (θ) and offsetting the longitude (Φ) by 180˚. The following formulas can be used to calculate these values.
The sgn function, known as the sign function and signum function, is a complex function that extracts the sign of a real number. This function has the following characteristics:
The inverse of a Cartesian coordinate can be calculated by taking the x, y, and z components of the coordinate and multiply them by -1.
var lat = -1*latlong.Latitude;
var lon = 180-Math.abs(latlong.Longitude);
lon *= -1;
return new VELatLong(lat,lon);
Listing 1 Inverse Spherical Coordinate
The following algorithm calculates the inverse coordinate of a Cartesian coordinate. This algorithm takes in a Cartesian coordinate and returns a Cartesian coordinate.
return new Cartesian(-1*p1.X,-1*p1.Y,-1*p1.Z);
Listing 2 Inverse Cartesian Coordinate
The following post has additional information on the Cartesian object: http://rbrundritt.spaces.live.com/blog/cns!E7DBA9A4BFD458C5!280.entry