1

I want to find intersection of arc and line. But I have an error "I do not know the path name 'curc' ''

\begin{tikzpicture}[scale=1, font=\footnotesize, line join=round, line cap=round, >=stealth]

\path (0:0) coordinate(a) (10:5) coordinate(b) (90:6) coordinate(d) ($(b)+(d)-(a)$) coordinate(c) ($(a)!.5!(b)$) coordinate(m);

\begin{scope}[shift={(m)}]

\def\au{1.2} \def\bu{.5}

\draw[name path=curc] (0:\au) coordinate(A) arc (0:-160:{\au} and {\bu});

\end{scope}

\path[name path=ab] (a)--(b);

\path[name intersections={of=curc and ab,by={I}}];

\end{tikzpicture}
2
  • Please, always provide an MWE, which reproduce your problem
  • Sorry, but your question is not entirely clear. What you like get from your code fragment? Just illustration of an intersection or intersections?
  • Your code fragment is not complete.
  • Paths defined in your code fragment doesn't intersect

For illustration you can simplify your code of picture for example to:

\documentclass[tikz,border=3.141592]{standalone}
\usetikzlibrary{intersections}
\usepackage[low-sup]{subdepth}

\begin{document}
    \begin{tikzpicture}[
dot/.style = {circle, fill=orange, semitransparent, inner sep=1.2pt},
every label/.append style = {inner sep=1pt, font = \footnotesize}
                        ]
\def\au{1}
\def\bu{.5}

\path   (185:2.5)   coordinate[label=a] (a)
        ( 15:2.5)   coordinate[label=b] (b);
\draw[name path=C] (30:\au) coordinate[label=A] (A) arc (0:-160:{\au} and {\bu});
\draw[name path=ab] (a) -- node[above, sloped] {m} (b);
\path[name intersections={of=C and ab, by=s}]
        node[dot, label=below:$s$] at (s) {};
    \end{tikzpicture}
\end{document}

enter image description here

In the case, that you like to indicate both intersections, than for intersections code use:

\path[name intersections={of=C and ab, by={s1,s2}}]
        node[dot, label=below:$s_1$] at (s1) {}
        node[dot, label=below:$s_2$] at (s2) {};

and you will get:

enter image description here

1
2

Extending the scope may help

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{calc, shadings, shadows, shapes.arrows}
\usetikzlibrary{positioning, intersections}
\tikzset{mark coordinate/.style={inner sep=0pt,
        outer sep=0pt,
        minimum size=3pt,
        fill=#1,
        circle}
}
\begin{document}
    \begin{tikzpicture}[scale=1, font=\footnotesize, line join=round, line cap=round, >=stealth]
        
        \path   (0:0) coordinate[label=a](a) 
                (10:5) coordinate[label=b](b) 
                (90:6) coordinate[label=d](d) 
                ($(b)+(d)-(a)$) coordinate[label=c](c) 
                ($(a)!.5!(b)$) coordinate[label=m](m);
        
        \begin{scope}[shift={(m)}]
            
            \def\au{1} 
            \def\bu{.9}
            
            \draw[name path=curc] 
            (40:\au) coordinate[label=A](A) 
            arc (0:-160:{\au} and {\bu});
            
    
        
        \draw[name path=ab] (a)--(b);
        
        \draw[name intersections={of=curc and ab,by={I}}];
        
        \fill [name intersections={of=curc and ab, name=l}] 
        (l-1) coordinate [mark coordinate=orange]; 
            \end{scope}
    \end{tikzpicture} 
\end{document}

enter image description here

1

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.