%3A%20%D0%9A%D0%B0%D0%BA%20%D0%BF%D0%BE%D1%81%D1%82%D1%80%D0%BE%D0%B8%D1%82%D1%8C%20%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D0%BA%20%D0%BD%D0%B5%D1%8F%D0%B2%D0%BD%D0%BE%D0%B9%20%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8%20%D0%B4%D0%BB%D1%8F%20%D1%82%D1%80%D0%B5%D1%83%D0%B3%D0%BE%D0%BB%D1%8C%D0%BD%D0%B8%D0%BA%D0%B0.png)
Как я могу построить
\pgfmathsetmacro\xA{0}
\pgfmathsetmacro\yA{0}
\pgfmathsetmacro\xB{1}
\pgfmathsetmacro\yB{0}
\pgfmathsetmacro\xC{0.5}
\pgfmathsetmacro\yC{0.5*sqrt(3)}
f(x,y)=4*( (x -\xA)^2 + (y - \yA)^2)*((x -\xB)^2 + (y -\yB)^2 )
-( ((x -\xC)^2 + (y -\yC)^2)
-((x -\xA)^2 + (y -\yA)^2)
-((x -\xB)^2 + (y -\yB)^2) )^2;
вместе с Равносторонним треугольником
\addplot[no marks] coordinates {(\xA,\yA) (\xB,\yB) (\xC,\yC) (\xA,\yA) };
В этом случае должно получиться что-то вроде дуги окружности под стороной треугольника AB.
Кажется, мои методы не все хороши. Я не эксперт по gnuplot.
% arara: pdflatex: {shell: yes}
\documentclass[margin=5mm, tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
% Ecken
\pgfmathsetmacro\xA{0}
\pgfmathsetmacro\yA{0}
\pgfmathsetmacro\xB{1}
\pgfmathsetmacro\yB{0}
\pgfmathsetmacro\xC{0.5}
\pgfmathsetmacro\yC{0.5*sqrt(3)}
% A(0,0); B(1,0); C(0.5, 0.5*sqrt(3))
\begin{tikzpicture}
\begin{axis}[axis equal,
title={$|AX| + |BX| = |CX|$},
]
\addplot +[%smooth,
no markers,
raw gnuplot,
thick,
%empty line = jump % not strictly necessary,
] gnuplot {
f(x,y)=4*((x -\xA)^2 + (y - \yA)^2)*((x -\xB)^2 + (y -\yB)^2)
-( ((x -\xC)^2 + (y -\yC)^2)
-((x -\xA)^2 + (y -\yA)^2)
-((x -\xB)^2 + (y -\yB)^2) )^2;
set cntrparam levels discrete 0,0;
set isosample 100,100;
set size square;
set view equal xy;
set cont base;
unset surface;
splot f(x,y);
};
\addlegendentry{$X$}
\addplot[no marks] coordinates {(\xA,\yA) (\xB,\yB) (\xC,\yC) (\xA,\yA) };
\draw[fill=white] (\xA,\yA) circle (1.75pt) node[anchor=north east]{$A(\xA,\yA)$};
\draw[fill=white] (\xB,\yB) circle (1.75pt) node[anchor=north]{$B(\xB,\yB)$};
\draw[fill=white] (\xC,\yC) circle (1.75pt) node[anchor=east]{$C(\xC,\yC)$};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
view = {0}{90},
axis equal,
% restrict x to domain = -2.2:3
]
\addplot3 [contour gnuplot = {labels = false}, samples=10]
{
2*sqrt((x -\xA)^2 + (y - \yA)^2)*sqrt((x -\xB)^2 + (y -\yB)^2)
-( ((x -\xC)^2 + (y -\yC)^2)
-((x -\xA)^2 + (y -\yA)^2)
-((x -\xB)^2 + (y -\yB)^2) )^1
};
\addlegendentry{$X$}
\addplot[no marks] coordinates {(\xA,\yA) (\xB,\yB) (\xC,\yC) (\xA,\yA) };
\draw[fill=white] (\xA,\yA) circle (1.75pt) node[anchor=north east]{$A(\xA,\yA)$};
\draw[fill=white] (\xB,\yB) circle (1.75pt) node[anchor=north]{$B(\xB,\yB)$};
\draw[fill=white] (\xC,\yC) circle (1.75pt) node[anchor=east]{$C(\xC,\yC)$};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
axis equal,
% restrict y to domain = -4:4,
]
\addplot + [
no markers,
raw gnuplot,
thick,
]
gnuplot {
f(x,y)=4*((x -\xA)^2 + (y - \yA)^2)*((x -\xB)^2 + (y -\yB)^2)
-( ((x -\xC)^2 + (y -\yC)^2)
-((x -\xA)^2 + (y -\yA)^2)
-((x -\xB)^2 + (y -\yB)^2) )^2;
set contour base;
set cntrparam levels discrete 0.01;
unset surface;
set view map;
set isosamples 300;
splot f(x,y);
};
\addlegendentry{$X$}
\addplot[no marks] coordinates {(\xA,\yA) (\xB,\yB) (\xC,\yC) (\xA,\yA) };
\draw[fill=white] (\xA,\yA) circle (1.75pt) node[anchor=north east]{$A(\xA,\yA)$};
\draw[fill=white] (\xB,\yB) circle (1.75pt) node[anchor=north]{$B(\xB,\yB)$};
\draw[fill=white] (\xC,\yC) circle (1.75pt) node[anchor=east]{$C(\xC,\yC)$};
\end{axis}
\end{tikzpicture}
\end{document}