Generate 2D terrain like hill climb racing / tiny wings ?

I work at a bike game with libGDX and box2d, i want to generate my terrain dynamically.

Something like the hill climb racing or tiny wings terrain, and I need it like in parts, one part would be a Array List of points…

When the bike is close to the end, i’ll create another part, etc.

Something like this

http://s2.postimg.org/44vxb13zd/rect3759.png

Do you guys anywhere to find to do something like this?
The terrain should not go back.