0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

tikzで辺の長さを書き込む時の微調整

Posted at

tikzで三角形の辺の長さを書き込みたいとき

midwayで書き込むことはいろんなページで説明されているが、書き込む長さが5cmとかだと、少し位置を調整したい時がある。
位置を調整するのが

anchor=east
とかなので、midwayの代わりにanchor=eastを書いたりしてうまくいかない感じになっていたが、どちらも書くことで求める図が記述できた。

midwayのみの時の図(5cmが重なってしまっている、これを少し右に移動させたい。test.jpg
)

完成図形

三角関数説明の図[30do比がついている].jpg

\begin{tikzpicture}

\path(0,0) node[name=o]{};
\path(0:{sqrt(3)*4}) node[name=a]{};%{sqrt(3)}*4とするとエラーが出るので注意
\path(30:2*4) node[name=b]{};

\huge

\path pic[draw,"$\SI{30}{\degree}$",angle eccentricity=2,angle radius=25pt]{angle=a--o--b};
\path pic[draw,"",angle eccentricity=2]{right angle=b--a--o};


\path [draw,dashed] (o) to[out=60,in=180,edge node={node [midway,fill=white]{ここの長さは?}}](b);
\path [draw,dashed] (a) to[out=60,in=300,edge node={node [midway,anchor=mid west,fill=white]{$\SI{5}{\centi\meter}$}}](b);


%\path[draw,arrows=-stealth,color=red,line width=3pt] (0,0) --(0:4) node[anchor=north east] {$\overrightarrow{a}$};
%\path[draw,arrows=-stealth,color=blue,line width=3pt] (0,0) --(180:5) node[anchor=east] {$\overrightarrow{b}$};

\path[draw,line width=2pt] (0,0) --(30:2*4) --(0:{sqrt(3)*4}) --(0,0);

\end{tikzpicture}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?