Classical mechanics on fractal curves