Hamiltonian Frenet–Serret dynamics