you may want to make each slope as an art asset in an art program such as photoshop or gimp, and then build each like a room setting up the collisions and such on each, and then implement java or possibly a large series of events to perform "procedural generation" where it calls in the next frame (into memory) ahead of time and uses a random number generator to determine each (possibly with if then statements to prevent certain slopes from occurring after specific slopes if you wanna get complicated or run into issues with how they blend) otherwise your looking at a lot of math if you want to create an algorithm that actually graphs out each slope randomly and if you aren't careful with coding it you may end up with impossible slopes that break your game. there are some decent java game programming tutorials on youtube that may be of help if you are looking to go that route, instead of trying to manage with strictly events (which can probably be done, but in a lot more lines id imagine)
anyhow i hope this was at least somewhat helpful in pointing you in the right direction.