Bearing capacity of foundations on rock mass using the method of characteristics