Town separation by track & crow

An old town wishes to link to a new suburb by commuter rail. They turn to a trigonometrically obsessed railroad builder who suggests laying sine-function shaped tracks from the old town to the site of the new suburb. [Quarter cycle sine function rail tracks of all sizes are available at low cost.] You can position the new suburb by dragging the YELLOW dot in the left panel. You can adjust the "curvy-ness" of the railroad track using the slider. Can you explain the shape of the curves in the right panel?