Unified method for truss analysis