円と直線の交差「パス」(II)

円と直線の交差「パス」(II)

この回答に続いて円が(1)3点、(2)1点と中心で定義されている場合の交点を見つけるのにも同様のスタイルを使用することが可能でしょうか?

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
    \coordinate (A) at (0,0);
    \coordinate (B) at (2,5);
    \coordinate (C) at (4,0);
    \coordinate (D) at (6,3);
    \coordinate (E) at (4,2);

    \draw (A)--(B)--(C)--cycle (D)--(E);
\end{tikzpicture}
\end{document}

(例えば、(1)A、B、Cを通る円と線分DEとの交点、(2)Aを中心Bとし、Aを通り線分DEとの交点。)

答え1

ケース(1)の場合:これに基づいていい答え

ケース(2)の場合:単純にthroughライブラリを使用する。

\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections,through,calc}
\tikzset{circle through 3 points/.style n args={3}{%
insert path={let    \p1=($(#1)!0.5!(#2)$),
                    \p2=($(#1)!0.5!(#3)$),
                    \p3=($(#1)!0.5!(#2)!1!-90:(#2)$),
                    \p4=($(#1)!0.5!(#3)!1!90:(#3)$),
                    \p5=(intersection of \p1--\p3 and \p2--\p4)
                    in },
at={(\p5)},
circle through= {(#1)}
}}
\begin{document}

\begin{tikzpicture}
    \coordinate (A) at (0,0);
    \coordinate (B) at (2,5);
    \coordinate (C) at (4,0);
    \coordinate (D) at (6,3);
    \coordinate (E) at (4,2);
    \draw (A)--(C)node[midway,below]{(1)}--(B)--cycle;
    \path [draw, name path=line] (D)--(E);
    \node[name path=circ, circle through 3 points={A}{B}{C},draw=blue]{};
    \path [name intersections={of=circ and line, by={K}}] ;
    \node[circle,minimum size=2pt,fill=red] at(K) {};

\end{tikzpicture}
\hfill
\begin{tikzpicture}[scale=0.55]
    \coordinate (A) at (0,0);
    \coordinate (B) at (2,5);
    \coordinate (C) at (4,0);
    \coordinate (D) at (6,3);
    \coordinate (E) at (4,2);
    \draw (A)--(B)--(C)--cycle;
    \path [draw, name path=line] (D)--(E);
    \node [draw, name path=circ] at (A) [circle through=(B)] {};
    \path [name intersections={of=circ and line, by={K}}] ;
    \node[circle,minimum size=2pt,fill=red] at(K) {};
\end{tikzpicture}

\end{document}

ここに画像の説明を入力してください

関連情報