compute mass based on rest position