2

I created the following:

\documentclass[article]
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{fontawesome5}
\tikzset{vehicle/.style={anchor=base,scale=0.5,teal}}

\begin{document}
\begin{figure}[ht!]
\centering
\begin{tikzpicture}
  \begin{axis} [
    axis x line=none,
    axis y line=none,
    x=0.15cm,
    y=0.15cm,
    ytick={-40,-38,...,40},
    xtick={-30,-28,...,30},
    ymin=-40.33,
    ymax=40.33,
    xmin=-40.33,
    xmax=40.33,
]


\node[vehicle] at (12,\pgflinewidth) { \faCarSide};
\node[vehicle] at (-13.8,\pgflinewidth) { \faCarSide};

\node[vehicle] at (10,-6.25) {\Huge \faShip};
\addplot [color=red, domain=-20:20, samples=100, thick] {0.03125*x^2};


%Br\"uckenbogen
\addplot [color=blue, domain=-20:0, samples=100, thick] {-1/16*(x+10)^2};
\addplot [color=blue, domain=0:20, samples=100, thick] {-1/16*(x-10)^2};


\addplot [color=red, domain=-40:-20, samples=100, thick] {0.03125*(x+40)^2};
\addplot [color=red, domain=20:40, samples=100, thick] {0.03125*(x-40)^2};
\addplot [color=black, thick, domain=-45:45, samples=100] {0*x};
\addplot [mark=none] coordinates {(15, 0) (15,225/32)};
\addplot [mark=none] coordinates {(10, 0) (10,25/8)};
\addplot [mark=none] coordinates {(5, 0) (5,25/32)};
\addplot [thick, mark=none] coordinates {(-15, 0) (-15,225/32)};
\addplot [mark=none] coordinates {(-10, 0) (-10,25/8)};
\addplot [mark=none] coordinates {(-5, 0) (-5,25/32)};
\addplot [ultra thick, mark=none] coordinates {(20,-6.25) (20,20)}; %line width=2pt,
\addplot [ultra thick, mark=none] coordinates {(-20,-6.25) (-20,20)};

\addplot[only marks,mark=*,mark options={scale=0.8, fill=red},text mark as node=true, point meta=explicit symbolic, nodes near coords, nodes near coords style={font=\tiny}] 
        coordinates { (-20,12.5) []   (20,12.5) []  };

\coordinate (A) at (-19.5,12.5);
\coordinate (B) at (19.5,12.5);
\node at (A) [above left = -0.2mm of A] {\small A};
\node at (B) [above right = -0.2mm of B] {\small B};

\draw[<->,black] (A) -- (B) node [midway, sloped, above] {\small Spannweite};

\coordinate (C) at (0,0);
\coordinate (D) at (0,12.5);
\draw[<->,black] (C) -- (D) node [midway, right, draw=none] {\rotatebox{270}{\small H\"ohe}};
\end{axis}


\end{tikzpicture}
\caption{Querschnitt der H\"angebr\"ucke mit zus\"atzlicher Befestigung}\label{fig3}
\end{figure}

\end{document}

Result: enter image description here

Now I would like to have water waves exactly below the ship between points A and B. The ground should begin to the left and right of the water below the road. I really have no idea how to implement this and would be happy if someone could help me.

3
  • See the second example on page 641, 50.3.2 Decorations Producing Curved Line Paths, TikZ & PGF manual, version 3.1.10.
    – Zarko
    Mar 23 at 18:45
  • @Zarko First of all thanks for the hint. Can you still sketch me a solution?
    – wayne
    Mar 23 at 21:01
  • 1
    Interesting design. A suspension bridge and arched bridge hybrid, with different supports, Don't see that every day! Mar 24 at 3:34

1 Answer 1

2

I dont know how, with your code, you have the picture annexed.

  1. change the first 3 lines of Your code with the following ones:
\documentclass[11pt]{article}% <-- changed

\usepackage{amsmath}

\usepackage{pgfplots}% <-- changed
  1. In the tikzpicture environment add this line (or similars):
\foreach \i in {-6,-6.5,...,-10}
            \addplot[line width=2pt,cyan!50,domain=-25:25,smooth] {.2*sin(x*180/pi+3*\i)+\i};

The output I have (no boats!):

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .