
これらの曲線を補間しようとしましたが、得られる結果はあまり良くありません。
私が試したこと:
\documentclass[french,25pt,a4paper,landscape]{article}
\usepackage{etex}
\usepackage{tikz}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\begin{document}
\begin{center}
\definecolor{qqwuqq}{rgb}{0,0.39215686274509803,0}
\definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
\definecolor{qqqqff}{rgb}{0,0,1}
\begin{tikzpicture}[line cap=round,line join=round,>=stealth,x=1cm,y=1cm]
\coordinate[label=below:$O$] (A) at (0,0);
\coordinate[label=below left:] (B) at (0,4);
\coordinate[label=below left:$t$] (C) at (4,0);
\coordinate[label=above right:] (D) at (0.54,1.04);
\coordinate[label=above right:] (E) at (1.38,1.58);
\coordinate[label=above right:] (F) at (1.9,1.667);
\coordinate[label=above right:] (G) at (2.76,1.767);
\coordinate[label=above right:] (H) at (4.36,1.8);
\coordinate[label=above right:] (I) at (0.3,3.82);
\coordinate[label=above right:] (J) at (0.5,3.5);
\coordinate[label=above right:] (K) at (0.7,2.94);
\coordinate[label=above right:] (L) at (0.84,2.44);
\coordinate[label=above right:] (M) at (1,2);
\coordinate[label=above right:] (N) at (1.24,1.36);
\coordinate[label=above right:] (O) at (1.86,0.86);
\coordinate[label=above right:] (P) at (2.44,0.54);
\coordinate[label=above right:] (Q) at (2.86,0.22);
\coordinate[label=above right:] (R) at (3.42,0.18);
\coordinate[label=above right:] (S) at (0.84,0.38);
\coordinate[label=above right:] (T) at (1.61,1.04);
\coordinate[label=above right:] (U) at (1.92,1.68);
\coordinate[label=above right:] (V) at (2.52,3.04);
\coordinate[label=above right:] (W) at (2.84,4.32);
\draw [->,line width=0.8pt] (A) -- (B) node[midway, below left] {};
\draw [->,line width=0.8pt] (A) -- (C) node[midway, above] {};
\draw [red] plot [smooth, tension=0.6] coordinates { (A) (D) (E) (F) (G) (H)};
\draw [blue, dashed] plot [smooth, tension=0.6] coordinates { (I) (J) (K) (L) (M) (N) (O) (P) (Q) (R)};
\draw [green] plot [smooth, tension=0.6] coordinates { (A) (S) (T) (U) (V) (W)};
\fill (A) circle (2pt);
\fill (B) circle (0pt);
\fill (C) circle (0pt);
\end{tikzpicture}
\end{center}
\end{document}
結果 :
これらの曲線を滑らかにして、よりリアルに見せるにはどうしたらいいでしょうか?また、丸で囲んだ数字も追加したいです
答え1
やり方は次のとおりです。キー:
- 例から不要なコードを削除する
- 置き換える
--
to[out=,in=]
- 青い曲線の中間点を設定する
- 各曲線の端にラベルを貼り、それをずらすいくつかのバリエーションを用意する
ベジェ曲線を介した別のアプローチである を使用することもできます。 の効果は視覚化しやすいcontrols
と思います。to
クラスを使用してグラフィックを別のファイルに描画しstandalone
、パッケージを介して上記のPDFを含めることをお勧めしますgraphicx
。一例私はそうすることを提案したが数回(詳細を見る)。
%\documentclass[french,25pt,a4paper,landscape]{article}
%\usepackage{etex}
%
%\usepackage{tikz}
%\usepackage[T1]{fontenc}
%\usepackage{xcolor}
\documentclass[10pt,border=3mm,tikz]{standalone}
\begin{document}
% \begin{center}
% ~~~ you don't use them here ... ~~~~~~~~~~~~~~~~~~~~~
% \definecolor{qqwuqq}{rgb}{0,0.39215686274509803,0}
% \definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
% \definecolor{qqqqff}{rgb}{0,0,1}
\begin{tikzpicture}[
line cap=round,
line join=round,
>=stealth,
lbl/.style={draw,circle},
% x=1cm,y=1cm
]
\coordinate[label=below:$O$] (A) at (0,0);
\coordinate[label=below left:] (B) at (0,4);
\coordinate[label=below left:$t$] (C) at (4,0);
%
% \coordinate[label=above right:] (D) at (0.54,1.04);
% \coordinate[label=above right:] (E) at (1.38,1.58);
% \coordinate[label=above right:] (F) at (1.9,1.667);
% \coordinate[label=above right:] (G) at (2.76,1.767);
\coordinate[label=above right:] (H) at (4.36,1.8);
%
\coordinate[label=above right:] (I) at (0.3,3.82);
% \coordinate[label=above right:] (J) at (0.5,3.5);
% \coordinate[label=above right:] (K) at (0.7,2.94);
% \coordinate[label=above right:] (L) at (0.84,2.44);
% \coordinate[label=above right:] (M) at (1,2);
% \coordinate[label=above right:] (N) at (1.24,1.36);
% \coordinate[label=above right:] (O) at (1.86,0.86);
% \coordinate[label=above right:] (P) at (2.44,0.54);
% \coordinate[label=above right:] (Q) at (2.86,0.22);
\coordinate[label=above right:] (R) at (3.42,0.18);
%
% \coordinate[label=above right:] (S) at (0.84,0.38);
% \coordinate[label=above right:] (T) at (1.61,1.04);
% \coordinate[label=above right:] (U) at (1.92,1.68);
% \coordinate[label=above right:] (V) at (2.52,3.04);
\coordinate[label=above right:] (W) at (2.84,4.32);
% ~~~ y- and x-axis ~~~~~~~~~~~~~~~~~~~~~~~~~
\draw [->,line width=0.8pt] (A) -- (B) node[midway, below left] {?};
\draw [->,line width=0.8pt] (A) -- (C) node[midway, above] {??};
% ~~~ curves ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%\draw[red] (A) -- (H); % start like this
\draw[red] (A) to[out=60,in=182] (H) node[lbl,yshift=4mm] {3}; % refined
\draw[teal!80] (A) to[out=20,in=250] (W) node[lbl,shift=(200:7mm)] {1};
\draw[blue,dashed]
(I) to[out=-35,in=110] +(.7,-1.6)
to[out=290,in=180] (R) node[lbl,shift=(120:7mm)] {2};
%\draw [red] plot [smooth, tension=0.6] coordinates { (A) (D) (E) (F) (G) (H)};
%\draw [blue, dashed] plot [smooth, tension=0.6] coordinates { (I) (J) (K) (L) (M) (N) (O) (P) (Q) (R)};
%\draw [green] plot [smooth, tension=0.6] coordinates { (A) (S) (T) (U) (V) (W)};
\fill (A) circle (2pt);
\fill (B) circle (0pt);
\fill (C) circle (0pt);
\end{tikzpicture}
% \end{center}
\end{document}