View this project on GitHub, or try it out.
The core idea is a 2-dimensional array which contains a height at each index. At each render cycle, I use a matrix to calculate the rotation of the landscape, and a slight variation on perspective to calculate the position of each point relative to the camera. The colour is determined based on the main colour, the height and the proximity to the camera. For each point, two triangles are drawn, all of which interweave to produce a full landscape without any gaps.
There are four options when creating a new landscape. The size is simply the amount of grid squares along each side (40 runs smoothly for me on a mid-range desktop, at 50 it becomes a little jerky, at 90 it's very jerky and the limit of useability is about 200). The steepness is simply a multiplier for the height at each point when rendering. The trees are very unrealistic - essentially another layer drawn on at random points in a darker colour. I tried various ways of doing this decided that I'd come back to it later, when I'm older and wiser. And finally, texture can be added using the canvas pixel manipulation routines, which I have employed to change the value of each pixel's colour randomly by a small amount. Note that adding texture is quite an intensive operation, so you might want to disable it for smoother running.