[Tex/LaTex] Drawing street curve

tikz-pgf

I have a problem. In order to use a special picture in my seminar paper i need to draw the following picture:

enter image description here

The car and the arrows can be neglected but the curvy road exceeds my abilities.
Tried to draw if using circles drawn on top of each other, but couldn't really make it work.

Thanks for any help.

Cheers

EDIT:
Thank you guys for all these possibilites! You exceeded my expectations:)

Best Answer

Just for fun, since this is a repeating theme: draw a curve parallel to an existing curve. Here this is done by a decoration named street mark.

\documentclass[tikz,border=7pt]{standalone}
\usetikzlibrary{decorations,decorations.markings} 
\pgfkeys{/tikz/.cd,
    street mark distance/.store in=\StreetMarkDistance,
    street mark distance=10pt,
    street mark step/.store in=\StreetMarkStep,
    street mark step=1pt,
}

\pgfdeclaredecoration{street mark}{initial}
{% 
\state{initial}[width=\StreetMarkStep,next state=cont] {
    \pgfmoveto{\pgfpoint{\StreetMarkStep}{\StreetMarkDistance}}
    \pgfpathlineto{\pgfpoint{0.3\pgflinewidth}{\StreetMarkDistance}}
    \pgfcoordinate{lastup}{\pgfpoint{1pt}{\StreetMarkDistance}}
    \xdef\marmotarrowstart{0}
  }
  \state{cont}[width=\StreetMarkStep]{
     \pgfmoveto{\pgfpointanchor{lastup}{center}}
     \pgfpathlineto{\pgfpoint{\StreetMarkStep}{\StreetMarkDistance}}
     \pgfcoordinate{lastup}{\pgfpoint{\StreetMarkStep}{\StreetMarkDistance}}
  }
  \state{final}[width=\StreetMarkStep]
  { % perhaps unnecessary but doesn't hurt either
    \pgfmoveto{\pgfpointdecoratedpathlast}
  }
}

\newcommand{\testpath}{(0,0) to[out=90,in=-30] (-3,4)}
\begin{document}
  \begin{tikzpicture}[scale=1]
    \clip (-2,0) rectangle (1,3.5);
    \path[fill=green!66!black] (-2,0) rectangle (1,3.5);
    \draw[line width=30,gray] \testpath;
    \draw[draw=white,dashed,double=gray,double distance=10] \testpath;
    \draw[line width=10,gray] \testpath;
    \draw[yellow,decorate,decoration={street mark},street mark distance=13] \testpath;
    \draw[white,decorate,decoration={street mark},street mark distance=-13] \testpath;
    \draw[decorate,decoration={markings,
     mark =at position 0.4 with {\draw[white,-latex,line width=1pt](0,0)
     coordinate(top) -- (1,0);}
    }] \testpath;
    \node[fill=red,minimum width=5pt,minimum height=12pt,anchor=north,rotate=10] (car) at
    (top){};
    \draw[white,-latex,line width=1pt] (top) -- ++(100:1); 
    \draw[white,line width=1pt] (top) -- ++(100:0.3) arc(100:124:0.3); 
  \end{tikzpicture}
\end{document}

enter image description here

The disadvantage is that the code is slightly more complex, the advantage is that you can take arbitrary curves for your streets.

ADDENDUM: Added a tangent, this could be also used in Sigur's nice answer. And just for fun an animation using these tricks.

\documentclass{article}

\usepackage{animate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[active,tightpage]{preview}
\makeatletter
\def\@anim@@newframe{\@ifstar\@anim@newframe\@anim@newframe}
\def\@anim@newframe{\end{preview}\begin{preview}}
\renewenvironment{animateinline}[2][]{%
  \let\newframe\@anim@@newframe%
  \let\multiframe\@anim@multiframe%
  \begin{preview}}{%
  \end{preview}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tikz}
\usetikzlibrary{decorations,decorations.markings} 
\pgfkeys{/tikz/.cd,
    street mark distance/.store in=\StreetMarkDistance,
    street mark distance=10pt,
    street mark step/.store in=\StreetMarkStep,
    street mark step=1pt,
}

\pgfdeclaredecoration{street mark}{initial}
{% 
\state{initial}[width=\StreetMarkStep,next state=cont] {
    \pgfmoveto{\pgfpoint{\StreetMarkStep}{\StreetMarkDistance}}
    \pgfpathlineto{\pgfpoint{0.3\pgflinewidth}{\StreetMarkDistance}}
    \pgfcoordinate{lastup}{\pgfpoint{1pt}{\StreetMarkDistance}}
    \xdef\marmotarrowstart{0}
  }
  \state{cont}[width=\StreetMarkStep]{
     \pgfmoveto{\pgfpointanchor{lastup}{center}}
     \pgfpathlineto{\pgfpoint{\StreetMarkStep}{\StreetMarkDistance}}
     \pgfcoordinate{lastup}{\pgfpoint{\StreetMarkStep}{\StreetMarkDistance}}
  }
  \state{final}[width=\StreetMarkStep]
  { % perhaps unnecessary but doesn't hurt either
    \pgfmoveto{\pgfpointdecoratedpathlast}
  }
}

\newcommand{\testpath}{(0,0) to[out=0,in=-70] (3,3.5) to[out=110,in=0] (0,5)}
\begin{document}
\begin{animateinline}[autoplay,loop]{2}
  \multiframe{51}{i=0+1}{\pgfmathsetmacro{\mypos}{0.2+\i/100}
  \pgfmathsetmacro{\mynextpos}{\mypos+0.115}
  \begin{tikzpicture}
    \path[fill=green!66!black] (0,-0.5) rectangle (4,5.5);
    \draw[line width=30,gray] \testpath;
    \draw[draw=white,dashed,double=gray,double distance=10] \testpath;
    \draw[line width=10,gray] \testpath;
    \draw[yellow,decorate,decoration={street mark},street mark distance=13] \testpath;
    \draw[white,decorate,decoration={street mark},street mark distance=-13] \testpath;
    \draw[decorate,decoration={markings,
     mark =at position \mynextpos with {\coordinate (top);},
     mark =at position \mypos with {\coordinate (car) at    (0,0){};
    \fill[red] (6pt,3pt) -- (-6pt,3pt) -- (-6pt,-3pt) -- (6pt,-3pt) -- cycle;
     \draw[white,-latex,line width=1pt](car) -- ++ (1,0);
     \draw[white,-latex,line width=1pt](car) -- (top);}
    }] \testpath;
    ;
  \end{tikzpicture}}
\end{animateinline}  
\end{document}

enter image description here