14

I want to fill between two parabolas of this picture, but not correct. I tried:

\documentclass[12pt,border=5mm]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}

\usepackage{fouriernc}
\usetikzlibrary{calc}
\tikzset{hidden/.style = {thick, dashed}}
\newcommand{\RightAngle}[4][2.5pt]{%
        \draw ($#3!#1!#2$)
        --($ #3!2!($($#3!#1!#2$)!.5!($#3!#1!#4$)$) $)
        --($#3!#1!#4$) ;
        }
\begin{document}

\newcommand\pgfmathsinandcos[3]{%
\pgfmathsetmacro#1{sin(#3)}%
\pgfmathsetmacro#2{cos(#3)}%
}
\begin{tikzpicture}[scale=1]
\pgfmathsetmacro\AngleFuite{120}
\pgfmathsetmacro\coeffReduc{.8}
\pgfmathsetmacro\clen{2}
\pgfmathsinandcos\sint\cost{\AngleFuite}
\begin{scope} [x = {(\coeffReduc*\cost,-\coeffReduc*\sint)},
y = {(1cm,0cm)},
z = {(0cm,1cm)}]
\path coordinate (O) at (0,0,0)
coordinate (M) at (0,4,0)
coordinate (N) at (-3.46,2,0)
coordinate (P) at (-3.46,-2,0)
coordinate (Q) at (0,-4,0)
coordinate (R) at (3.46,-2,0)
coordinate (S) at (3.46,2,0)
coordinate (T) at (0,0,10)
coordinate (O) at (0,0,0)
;
\draw[ dashed] (O)--(N) (O)--(M) (O)--(P) (O)--(Q) (O)--(R) (O)--(S) ;
\draw[dashed] (N)--(P) (P)--(Q) (O)--(T);
\draw[thick] (Q)--(R) (R)--(S) (S)--(M) (M)--(N) ;
\draw[thick,blue] (N)parabola(T) (Q)parabola(T) (R)parabola(T) (S)parabola(T) (M)parabola(T);
\draw[thick,dashed] (P)parabola(T) ;
\end{scope}
\foreach \v/\position in {N/right,M/right,P/right,O/below,Q/left,R/below,S/below,T/right} {
\draw[fill=black] (\v) circle (2pt) node [\position=5] {$\v$};
}
\draw [fill opacity=0.4,fill=orange!80!blue] (R) parabola (T) parabola (S);
\end{tikzpicture}
\end{document}

enter image description here

How can I repair?

1 Answer 1

11

Use [bend at end] if you want to flip the parabola. That is, (S) parabola (T) is equivalent to (T) parabola[bend at end] (S). See the manual page 155.

In your case, replace

\draw [fill opacity=0.4,fill=orange!80!blue] (R) parabola (T) parabola (S);

by

\draw[fill opacity=0.4,fill=orange!80!blue](R)parabola(T)parabola[bend at end](S);

2
  • There is a small segment PQ out side \draw[fill opacity=0.4,fill=cyan!80!blue](Q)parabola(T)parabola[bend at end](R); How can I repair? May 7, 2017 at 14:58
  • @toandhsp the TikZ library intersection will provide an answer.
    – Symbol 1
    May 7, 2017 at 17:35

You must log in to answer this question.

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