Trilateration

I'm looking for way to determine unknown 3d location of point based on only known distance to other objects (with known 3d location). Using method of Trilateration to do this but having trouble with the math. Need of course to have at least 3 known points with distances to objects (with room for 4th point as well).

http://gis.stackexchange.com/questions/66/trilateration-using-3-latitude...
https://en.wikipedia.org/wiki/Trilateration

Any help on this would be greatly appreciated.