TikZでかいた図形

# TikZでかいた図形



![](https://texclip.marutank.net/render.php/texclip20230701023914.svg?s=%5Cusetikzlibrary%7Bmath%2Ccalc%2Cintersections%7D%0D%0A%5Cdef%5Cunicm%7B%5Crm%7Bcm%7D%7D%0D%0A%5Cbegin%7Btikzpicture%7D%0D%0A%5Ccoordinate%20(O)%20at%20(0%2C0)%3B%0D%0A%25%20%E5%8D%8A%E5%86%86%E5%B0%8F%E3%81%AE%E5%8D%8A%E5%BE%84%E8%A8%AD%E5%AE%9A%0D%0A%5Ctikzmath%0D%0A%7B%0D%0Aint%20%5Crad%3B%0D%0A%5Crad%7B1%7D%20%3D%208*5%2F7%3B%0D%0A%5Crad%7B2%7D%20%3D%205*5%2F7%3B%0D%0A%5Crad%7B3%7D%20%3D%20%5Crad%7B1%7D%20-%20%5Crad%7B2%7D%3B%0D%0A%5CAx%20%3D%20-2*%5Crad%7B2%7D%3B%0D%0A%5CAy%3D0%3B%0D%0A%5CBx%3D0%3B%0D%0A%5CBy%3D0%3B%0D%0A%5CCx%3D2*%5Crad%7B3%7D%3B%0D%0A%5CCy%3D0%3B%0D%0A%7D%0D%0A%5Ccoordinate%20(B)%20at%20(%5CBx%2C%5CBy)%3B%0D%0A%5Ccoordinate%20(A)%20at%20(%5CAx%2C%5CAy)%3B%0D%0A%5Ccoordinate%20(C)%20at%20(%5CCx%2C%5CCy)%3B%0D%0A%0D%0A%0D%0A%0D%0A%25%E6%96%9C%E7%B7%9A%0D%0A%5Cbegin%7Bscope%7D%0D%0A%5Ctikzmath%7B%0D%0A%20%20%20%20%5Chwidth%20%3D%200.1%3B%0D%0A%20%20%20%20%5ClineRange%20%3D%2020%3B%0D%0A%20%20%20%20%5CdirVecx%20%3D%201%3B%0D%0A%20%20%20%20%5CdirVecy%20%3D%201%3B%0D%0A%7D%0D%0A%25%E6%96%9C%E7%B7%9A%E3%81%AE%E6%96%B9%E5%90%91%E3%83%99%E3%82%AF%E3%83%88%E3%83%AB%0D%0A%5Ccoordinate%20(dirVec)%20at%20(%5CdirVecx%2C%5CdirVecy)%3B%0D%0A%25%E3%82%AF%E3%83%AA%E3%83%83%E3%83%97%E9%96%8B%E5%A7%8B%0D%0A%20%20%20%20%5Cclip%0D%0A%20%20%20%20%5Bsamples%3D100%2Cdomain%3D0%3A180%5D%20plot(%7B%5Crad%7B1%7D*cos(%5Cx)%2B0.5*%5CAx%2B0.5*%5CCx%7D%2C%7B%5Crad%7B1%7D*sin(%5Cx)%2B0.5*%5CAy%2B0.5*%5CCy%7D)%0D%0A%20%20%20%20%5Bsamples%3D100%2Cdomain%3D180%3A0%5D%20plot(%7B%5Crad%7B2%7D*cos(%5Cx)%2B0.5*%5CAx%2B0.5*%5CBx%7D%2C%7B%5Crad%7B2%7D*sin(%5Cx)%2B0.5*%5CAy%2B0.5*%5CBy%7D)%0D%0A%20%20%20%20plot(%7B%5Crad%7B3%7D*cos(%5Cx)%2B0.5*%5CBx%2B0.5*%5CCx%7D%2C%7B%5Crad%7B3%7D*sin(%5Cx)%2B0.5*%5CBy%2B0.5*%5CCy%7D)%0D%0A%20%20%20%20%3B%0D%0A%5Cforeach%20%5Cx%20in%20%7B-100%2C...%2C100%7D%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%5Cdraw%20(%24(%5Cx*%5Chwidth%2C0)%2B%5ClineRange*(dirVec)%24)%20--%20(%24(%5Cx*%5Chwidth%2C0)-%5ClineRange*(dirVec)%24)%3B%0D%0A%20%20%20%20%7D%0D%0A%5Cend%7Bscope%7D%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%5Cdraw%5Bvery%20thick%5D%20(A)%20--%20(C)%3B%0D%0A%25%E5%8D%8A%E5%86%86%E3%81%AE%E6%8F%8F%E7%94%BB%0D%0A%20%20%20%20%5Cdraw%5Bvery%20thick%2Csamples%3D100%2Cdomain%3D0%3A180%5D%20plot(%7B%5Crad%7B1%7D*cos(%5Cx)%2B0.5*%5CAx%2B0.5*%5CCx%7D%2C%7B%5Crad%7B1%7D*sin(%5Cx)%2B0.5*%5CAy%2B0.5*%5CCy%7D)%3B%0D%0A%0D%0A%20%20%20%20%5Cdraw%5Bvery%20thick%2Csamples%3D100%2Cdomain%3D0%3A180%5D%20plot(%7B%5Crad%7B2%7D*cos(%5Cx)%2B0.5*%5CAx%2B0.5*%5CBx%7D%2C%7B%5Crad%7B2%7D*sin(%5Cx)%2B0.5*%5CAy%2B0.5*%5CBy%7D)%3B%0D%0A%0D%0A%20%20%20%20%5Cdraw%5Bvery%20thick%2Csamples%3D100%2Cdomain%3D0%3A180%5D%20plot(%7B%5Crad%7B3%7D*cos(%5Cx)%2B0.5*%5CBx%2B0.5*%5CCx%7D%2C%7B%5Crad%7B3%7D*sin(%5Cx)%2B0.5*%5CBy%2B0.5*%5CCy%7D)%3B%0D%0A%0D%0A%0D%0A%25%E3%83%8E%E3%83%BC%E3%83%89%E3%82%92%E3%81%A4%E3%81%91%E3%82%8B%0D%0A%5Cforeach%20%5Cx%2F%5Cy%20in%20%7BA%2Fbelow%2CB%2Fbelow%2CC%2Fbelow%7D%0D%0A%5Cnode%5B%5Cy%5D%20at%20(%5Cx)%20%7B%5Cx%7D%3B%0D%0A%25%E9%95%B7%E3%81%95%E3%82%92%E3%81%8B%E3%81%8F%E3%82%88%0D%0A%5Cdef%5Cwrleng(%231-%232)%233%7B%0D%0A%5Cpreleng%7B%231%7D%7B%232%7D%7B%233%7D%7B25pt%7D%7B-90%7D%0D%0A%7D%25%0D%0A%5Cwrleng%20(A-B)%7B%5CLarge%2010%20%5Cunicm%20%7D%3B%0D%0A%5Cwrleng%20(B-C)%7B%5CLarge%206%20%5Cunicm%20%7D%3B%0D%0A%5Cend%7Btikzpicture%7D&f=c&r=300&m=s&b=f&k=f)


```tex
\begin{tikzpicture}
\coordinate (O) at (0,0);
% 半円小の半径設定
\tikzmath
{
int \rad;
\rad{1} = 8*5/7;
\rad{2} = 5*5/7;
\rad{3} = \rad{1} - \rad{2};
\Ax = -2*\rad{2};
\Ay=0;
\Bx=0;
\By=0;
\Cx=2*\rad{3};
\Cy=0;
}
\coordinate (B) at (\Bx,\By);
\coordinate (A) at (\Ax,\Ay);
\coordinate (C) at (\Cx,\Cy);



%斜線
\begin{scope}
\tikzmath{
    \hwidth = 0.1;
    \lineRange = 20;
    \dirVecx = 1;
    \dirVecy = 1;
}
%斜線の方向ベクトル
\coordinate (dirVec) at (\dirVecx,\dirVecy);
%クリップ開始
    \clip
    [samples=100,domain=0:180] plot({\rad{1}*cos(\x)+0.5*\Ax+0.5*\Cx},{\rad{1}*sin(\x)+0.5*\Ay+0.5*\Cy})
    [samples=100,domain=180:0] plot({\rad{2}*cos(\x)+0.5*\Ax+0.5*\Bx},{\rad{2}*sin(\x)+0.5*\Ay+0.5*\By})
    plot({\rad{3}*cos(\x)+0.5*\Bx+0.5*\Cx},{\rad{3}*sin(\x)+0.5*\By+0.5*\Cy})
    ;
\foreach \x in {-100,...,100}
    {
    \draw ($(\x*\hwidth,0)+\lineRange*(dirVec)$) -- ($(\x*\hwidth,0)-\lineRange*(dirVec)$);
    }
\end{scope}






\draw[very thick] (A) -- (C);
%半円の描画
    \draw[very thick,samples=100,domain=0:180] plot({\rad{1}*cos(\x)+0.5*\Ax+0.5*\Cx},{\rad{1}*sin(\x)+0.5*\Ay+0.5*\Cy});

    \draw[very thick,samples=100,domain=0:180] plot({\rad{2}*cos(\x)+0.5*\Ax+0.5*\Bx},{\rad{2}*sin(\x)+0.5*\Ay+0.5*\By});

    \draw[very thick,samples=100,domain=0:180] plot({\rad{3}*cos(\x)+0.5*\Bx+0.5*\Cx},{\rad{3}*sin(\x)+0.5*\By+0.5*\Cy});


%ノードをつける
\foreach \x/\y in {A/below,B/below,C/below}
\node[\y] at (\x) {\x};
%長さをかくよ
\def\wrleng(#1-#2)#3{
\preleng{#1}{#2}{#3}{25pt}{-90}
}%
\wrleng (A-B){\Large 10 \unicm };
\wrleng (B-C){\Large 6 \unicm };
\end{tikzpicture}
```
https://texclip.marutank.net/#s=%5Cusetikzlibrary%7Bmath%2Ccalc%2Cintersections%7D%0D%0A%5Cdef%5Cunicm%7B%5Crm%7Bcm%7D%7D%0D%0A%5Cbegin%7Btikzpicture%7D%0D%0A%5Ccoordinate%20(O)%20at%20(0%2C0)%3B%0D%0A%25%20%E5%8D%8A%E5%86%86%E5%B0%8F%E3%81%AE%E5%8D%8A%E5%BE%84%E8%A8%AD%E5%AE%9A%0D%0A%5Ctikzmath%0D%0A%7B%0D%0Aint%20%5Crad%3B%0D%0A%5Crad%7B1%7D%20%3D%208*5%2F7%3B%0D%0A%5Crad%7B2%7D%20%3D%205*5%2F7%3B%0D%0A%5Crad%7B3%7D%20%3D%20%5Crad%7B1%7D%20-%20%5Crad%7B2%7D%3B%0D%0A%5CAx%20%3D%20-2*%5Crad%7B2%7D%3B%0D%0A%5CAy%3D0%3B%0D%0A%5CBx%3D0%3B%0D%0A%5CBy%3D0%3B%0D%0A%5CCx%3D2*%5Crad%7B3%7D%3B%0D%0A%5CCy%3D0%3B%0D%0A%7D%0D%0A%5Ccoordinate%20(B)%20at%20(%5CBx%2C%5CBy)%3B%0D%0A%5Ccoordinate%20(A)%20at%20(%5CAx%2C%5CAy)%3B%0D%0A%5Ccoordinate%20(C)%20at%20(%5CCx%2C%5CCy)%3B%0D%0A%0D%0A%0D%0A%0D%0A%25%E6%96%9C%E7%B7%9A%0D%0A%5Cbegin%7Bscope%7D%0D%0A%5Ctikzmath%7B%0D%0A%20%20%20%20%5Chwidth%20%3D%200.1%3B%0D%0A%20%20%20%20%5ClineRange%20%3D%2020%3B%0D%0A%20%20%20%20%5CdirVecx%20%3D%201%3B%0D%0A%20%20%20%20%5CdirVecy%20%3D%201%3B%0D%0A%7D%0D%0A%25%E6%96%9C%E7%B7%9A%E3%81%AE%E6%96%B9%E5%90%91%E3%83%99%E3%82%AF%E3%83%88%E3%83%AB%0D%0A%5Ccoordinate%20(dirVec)%20at%20(%5CdirVecx%2C%5CdirVecy)%3B%0D%0A%25%E3%82%AF%E3%83%AA%E3%83%83%E3%83%97%E9%96%8B%E5%A7%8B%0D%0A%20%20%20%20%5Cclip%0D%0A%20%20%20%20%5Bsamples%3D100%2Cdomain%3D0%3A180%5D%20plot(%7B%5Crad%7B1%7D*cos(%5Cx)%2B0.5*%5CAx%2B0.5*%5CCx%7D%2C%7B%5Crad%7B1%7D*sin(%5Cx)%2B0.5*%5CAy%2B0.5*%5CCy%7D)%0D%0A%20%20%20%20%5Bsamples%3D100%2Cdomain%3D180%3A0%5D%20plot(%7B%5Crad%7B2%7D*cos(%5Cx)%2B0.5*%5CAx%2B0.5*%5CBx%7D%2C%7B%5Crad%7B2%7D*sin(%5Cx)%2B0.5*%5CAy%2B0.5*%5CBy%7D)%0D%0A%20%20%20%20plot(%7B%5Crad%7B3%7D*cos(%5Cx)%2B0.5*%5CBx%2B0.5*%5CCx%7D%2C%7B%5Crad%7B3%7D*sin(%5Cx)%2B0.5*%5CBy%2B0.5*%5CCy%7D)%0D%0A%20%20%20%20%3B%0D%0A%5Cforeach%20%5Cx%20in%20%7B-100%2C...%2C100%7D%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%5Cdraw%20(%24(%5Cx*%5Chwidth%2C0)%2B%5ClineRange*(dirVec)%24)%20--%20(%24(%5Cx*%5Chwidth%2C0)-%5ClineRange*(dirVec)%24)%3B%0D%0A%20%20%20%20%7D%0D%0A%5Cend%7Bscope%7D%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%5Cdraw%5Bvery%20thick%5D%20(A)%20--%20(C)%3B%0D%0A%25%E5%8D%8A%E5%86%86%E3%81%AE%E6%8F%8F%E7%94%BB%0D%0A%20%20%20%20%5Cdraw%5Bvery%20thick%2Csamples%3D100%2Cdomain%3D0%3A180%5D%20plot(%7B%5Crad%7B1%7D*cos(%5Cx)%2B0.5*%5CAx%2B0.5*%5CCx%7D%2C%7B%5Crad%7B1%7D*sin(%5Cx)%2B0.5*%5CAy%2B0.5*%5CCy%7D)%3B%0D%0A%0D%0A%20%20%20%20%5Cdraw%5Bvery%20thick%2Csamples%3D100%2Cdomain%3D0%3A180%5D%20plot(%7B%5Crad%7B2%7D*cos(%5Cx)%2B0.5*%5CAx%2B0.5*%5CBx%7D%2C%7B%5Crad%7B2%7D*sin(%5Cx)%2B0.5*%5CAy%2B0.5*%5CBy%7D)%3B%0D%0A%0D%0A%20%20%20%20%5Cdraw%5Bvery%20thick%2Csamples%3D100%2Cdomain%3D0%3A180%5D%20plot(%7B%5Crad%7B3%7D*cos(%5Cx)%2B0.5*%5CBx%2B0.5*%5CCx%7D%2C%7B%5Crad%7B3%7D*sin(%5Cx)%2B0.5*%5CBy%2B0.5*%5CCy%7D)%3B%0D%0A%0D%0A%0D%0A%25%E3%83%8E%E3%83%BC%E3%83%89%E3%82%92%E3%81%A4%E3%81%91%E3%82%8B%0D%0A%5Cforeach%20%5Cx%2F%5Cy%20in%20%7BA%2Fbelow%2CB%2Fbelow%2CC%2Fbelow%7D%0D%0A%5Cnode%5B%5Cy%5D%20at%20(%5Cx)%20%7B%5Cx%7D%3B%0D%0A%25%E9%95%B7%E3%81%95%E3%82%92%E3%81%8B%E3%81%8F%E3%82%88%0D%0A%5Cdef%5Cwrleng(%231-%232)%233%7B%0D%0A%5Cpreleng%7B%231%7D%7B%232%7D%7B%233%7D%7B25pt%7D%7B-90%7D%0D%0A%7D%25%0D%0A%5Cwrleng%20(A-B)%7B%5CLarge%2010%20%5Cunicm%20%7D%3B%0D%0A%5Cwrleng%20(B-C)%7B%5CLarge%206%20%5Cunicm%20%7D%3B%0D%0A%5Cend%7Btikzpicture%7D