Here are 2 versions. As Rob has pointed out there are different ways to do it depending on the end goal, especially if you want to have longer trains be able to pass through. Both of these can be stretched simply by adding the same length straights to the apex of the loop and the straight section. The 2nd example is preferred because it doesn't have the "S" curve.