0

I want to mark the intersections between \path and curve with circles and triangle. My circles are fine. But i have a problem with my triangle. The triangle indicates the direction of the curve, it's kind of an arrow. Maybe this helps you to understand what i'm talking about.

Here, is my MWE. For the convenient, i comment the error part.

\documentclass[tikz, border=1mm]{standalone}
\usetikzlibrary{shapes, arrows.meta, intersections}
\def\trigl{iscoceles triangle[width=1.4mm, rotate=-3]}
\begin{document}
    \begin{tikzpicture}
        \draw[-stealth] (0,0) -- (6.7,0) 
            node[right]{$x$}; %x-axis
        \draw[-stealth] (0,0) -- (0,3) 
            node[above]{$y$}; %y-axis
        \draw [thick, name path=curve1,{Circle[length=1.4mm]}-{Circle[length=1.4mm]}]
            (0.2,1) .. controls (2,.6) and (2.7,.6) .. (2.9,1.5) 
                    .. controls (3.1,2.7) and (4,3) .. (6.5,1.8);
        \path [name path = line1] (1,0)--(1,3.5) (1.4,0)--(1.4,3.5) (2.3,0)--(2.3,3.5) (2.7,0)--(2.7,3.5) (2.93,0)--(2.93,3.5) (3.25,0)--(3.25,3.5) (3.6,0)--(3.6,3.5) (4.4,0)--(4.4,3.5) (5.3,0)--(5.3,3.5) (5.7,0)--(5.7,3.5);
        \fill [name intersections={of=curve1 and line1, name=i}]
        \foreach \s in {1,2,3,4,6,7,8,9,10}{(i-\s) circle (2pt)};
%       \fill [name intersections={of=curve1 and line1, name=i}] {(i-5) \trigl (2pt)};
    \end{tikzpicture}
\end{document}
1
  • Like this.
    – user108724
    Sep 16, 2020 at 15:27

1 Answer 1

2

Just change the shape of node by regular polygon sides=3 (if it is a polygon) or circle or square etc, instead of defining new shape. You can also rotate it if its direction is not desired by rotate=30 or any amount.

\documentclass[tikz, border=1mm]{standalone}
\usepackage{amsmath}
\usepackage{bm}
\usetikzlibrary{shapes, arrows.meta, intersections}
\begin{document}
    \begin{tikzpicture}
        \draw[-stealth] (0,0) -- (6.7,0) 
            node[right]{$x$}; %x-axis
        \draw[-stealth] (0,0) -- (0,3) 
            node[above]{$y$}; %y-axis
        \draw [thick, name path=curve1,{Circle[length=1.4mm]}-{Circle[length=1.4mm]}]
            (0.2,1) .. controls (2,.6) and (2.7,.6) .. (2.9,1.5) 
                    .. controls (3.1,2.7) and (4,3) .. (6.5,1.8);
        \path [name path = line1] (1,0)--(1,3.5) (1.4,0)--(1.4,3.5) (2.3,0)--(2.3,3.5) 
       (2.7,0)--(2.7,3.5) (2.93,0)--(2.93,3.5) (3.25,0)--(3.25,3.5) (3.6,0)--(3.6,3.5) 
       (4.4,0)--(4.4,3.5) (5.3,0)--(5.3,3.5) (5.7,0)--(5.7,3.5);
        \fill [name intersections={of=curve1 and line1, name=i}]
        \foreach \s in {1,2,3,4,6,7,8,9,10}{(i-\s) circle (2pt)};
       \path [name intersections={of=curve1 and line1, name=i}] (i-5) node[regular 
      polygon,regular polygon sides=3, fill,inner sep=1pt] {};
    \end{tikzpicture}
\end{document}

enter image description here

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.