A cell based 2d array is probably the easiest method for track generation. Although this algorithm is flexible and easy to generate a landscape, the results are rather square.
 
For Example
21111111111111111112
10000000000000000001
10000000000000000001
10000000000000000001
21111111111111111112
This would give you a perfectly square track and four 90 degree corners.

0 - Nothing   1 - Road   2 - Corner

The Problem.



The main problem I found was with the corners.  These were represented by a sprite (texture) depicting a corner on a square polygon.  How do you program the computer to enable it to determine if the car has left the road on a corner section?
 
 

The Solution



The way I decided to combat this was to think of another way of generating the track.  Using arrays seemed a sound answer but I was not too sure what the best way to make proper use of them would be.  After several days working on several differing solutions I came up with the ABTGS.

To generate a track you need only one thing, an array listing the order of the track segments.

For Example

A track like the one shown below could easily be made up of an array like;

track[track_length]={1,1,1,1,1,1,2,2,3,3,1,1,3,3,3................1,2,2,2,2,1,1};
 

Section Types

1 = straight
2 = right hand bend
3 = left hand bend

If the track generation is implemented like a circular list then a track that will be made up of laps will be generated, otherwise a point to point track will be generated.

Advantages