Dynamic analysis of floating bodies for wave energy conversion