3

We can mark a point on ellipse using

\node[Maroon,draw,fill,circle,inner sep=1pt,label={-90:$X$}] (X) at (-120:2cm and 1cm) {};

Is there any way to define a point on parabola?

\documentclass[border=2pt]{standalone}
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\usepackage{tikz}

\color{Maroon} 

\begin{document}
\begin{tikzpicture}
\draw[thin,gray!50](-3,-2) grid (3,2);
\draw[Maroon,thick] (0,0) ellipse (2cm and 1cm);
\node[Maroon,draw,fill,circle,inner sep=1pt,label={-90:$X$}] (X) at (-120:2cm and 1cm) {};

\draw[red] (-1,0) parabola[parabola height=1.5cm] (2,0);
\end{tikzpicture}

\end{document}

enter image description here

4
  • Isn't this a duplicate of your own question?
    – Thruston
    Nov 22, 2018 at 10:13
  • @Thruston Using "decoration", i can not define different points on the curve. Here in ellipse, i can define point "X" based on the angle.
    – sandu
    Nov 22, 2018 at 10:18
  • 2
    Why can't you just load decorations.markings and do \draw[red,postaction={decorate,decoration={markings, mark=at position 0.2 with {% \node[red,draw,fill,circle,inner sep=1pt,label={-90:$Y$}](Y){};}}}] (-1,0) parabola[parabola height=1.5cm] (2,0);? Here the position plays the same role as the angle, it parametrizes the position of the location.
    – user121799
    Nov 22, 2018 at 12:45
  • @JouleV Yes....
    – sandu
    Mar 4, 2019 at 3:55

1 Answer 1

1

Based on marmot comment...

\documentclass[border=2pt]{standalone}
\usepackage[usenames,dvipsnames,svgnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\color{Maroon} 

\begin{document}
\begin{tikzpicture}
\draw[thin,gray!50](-3,-2) grid (3,2);
\draw[Maroon,thick] (0,0) ellipse (2cm and 1cm);
\node[Maroon,draw,fill,circle,inner sep=1pt,label={-90:$X$}] (X) at (-150:2cm and 1cm) {};

%\draw[red] (-1,0) parabola[parabola height=1.5cm] (2,0);
\draw[red,postaction={decorate,decoration={markings, mark=at position 0.5 with { \node[red,draw,fill,circle,inner sep=1pt,label={-90:$Y$}](Y){};}}}] (-1,0) parabola[parabola height=1.5cm] (2,0);
\end{tikzpicture}

\end{document}

You must log in to answer this question.

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