1

parabolic bridge arch

I have a parabola drawn through A, B and C. There are three different equations: for the top darker border, the fill (this is a hack just using a wide line) and the lower border. It's not quite what I want.

I'd like to emphasize that there are two separate sections of the arch which are pinned together at B so I am trying to draw AB on its own. In red, I plot the function for the upper border from A to almost B, then use an arc to touch at B and reach to bottom border of the arch.

I would like to chain a function call to my statement (the last statement below) that will plot the formula of the lower border of the arch from B back to A.

I'm not sure of the syntax:

  1. How do a I chain a function call, with a different domain from the first call in the statement?
  2. When plotting the parabola of the bottom border of the arch from B back to A, I need to draw the parabola from right to left (B_x to A_x). Is this possible?
 % arch fill (central formula)
 \draw[domain=4.2:13.825, color=LightCyan3, line width=0.375cm, line cap=rect] plot[id=1] function{-3*x*x/32+3*x/2};

 % upper arch border
 \draw[domain=3.85:14.187, color=LightCyan4, thick] plot[id=2] function{-.090215*x*x+1.4425*x+0.48342};

 % lower arch border
 \draw[domain=4.15:13.813, color=LightCyan4, thick] plot[id=3] function{-0.097567*x*x+1.5621*x-0.50220};

 % incomplete red border
 \draw[domain=3.85:7.75, draw=red, fill=none, very thick]plot[id=4] function{-0.090211*x*x+1.4425*x+0.48342}arc(90:-90:0.25); 

1

Most likely I do not fully understand or appreciate what you want. Yes, you can reverse the plot, and I do not think you need gnuplot for such a simple function.

\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{positioning,shapes.multipart,shapes,fit,decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\draw[domain=4.2:13.825, color=cyan, line width=0.375cm, line cap=rect] plot[id=1] function{-3*x*x/32+3*x/2};

 % upper arc border
 \draw[domain=3.85:14.187, color=cyan, thick] plot[variable=\x] 
 ({\x},{-.090215*\x*\x+1.4425*\x+0.48342});

 % lower arc border
 \draw[domain=4.15:13.813, color=cyan, thick] plot[variable=\x] 
 ({\x},{-0.097567*\x*\x+1.5621*\x-0.50220});

 % incomplete red border
 \draw[draw=red, fill=none, very thick,fill=red!20]
 plot[domain=3.85:7.75,variable=\x] ({\x},{-0.090211*\x*\x+1.4425*\x+0.48342})
 arc(90:-90:0.25)
 plot[domain=7.75:3.85,variable=\x] ({\x},{-0.097567*\x*\x+1.5621*\x-0.50220})
 -- (3.85,{-0.090211*3.85*3.85+1.4425*3.85+0.48342}); 
\end{tikzpicture}
\end{document}

enter image description here

For fun, I also shaded the contour. If you don't like this, just remove the fill=red!20 statement and -- (3.85,{-0.090211*3.85*3.85+1.4425*3.85+0.48342}) (but not the semicolon).

  • You understood perfectly. :) – dmorg Apr 21 '18 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.