連続体の説明に使えそうな芋みたいな図
from https://tikz.net/electric_field_body/
連続体力学のテキストによく出てくる連続体の形に似ていたのでメモ
実装
外形をto (TikZ)で書いているようだ
変更点
芋みたいな形をした連続体のコードだけ残した
defaultの値を削除
code:body.tikz(tex)
% Author: Izaak Neutelings (November, 2018)
% page 8 https://archive.org/details/StaticAndDynamicElectricity
% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz
% https://tex.stackexchange.com/questions/412899/tikz-calculate-and-store-the-euclidian-distance-between-two-coordinates
\begin{document}
% BODY charge distribution
\begin{tikzpicture}scale=0.8 %x={(1,0)},y={(0.5,1)}%,z={(0.73cm,0.73cm)}
\tikzset{
charged/.style={top color=blue!20,bottom color=blue!40,middle color=blue!30,shading angle=20}
}
\coordinate (B) at (4.1,-0.2);
\coordinate (L) at (0.0, 1.9);
\coordinate (TL) at (1.1, 3.5);
\coordinate (TM) at (3.1, 3.4);
\coordinate (T) at (6.1, 5.5);
\coordinate (R) at (7.8, 3.5);
\coordinate (SL) at (4.5, 3.7);
\coordinate (SR) at (6.7, 3.3);
\drawcharged
(B) toout= 10,in=-90 (R) toout= 90,in= 0 (T) toout=180,in= 60 (TM)
toout=162,in= 20 (TL) toout=200,in=90 (L) toout=-90,in=190 cycle;
\draw (TM) toout=162-180,in=144 ++(0.3,-0.15);
\draw % "smiley"
(SL) toout=-50,in=-150,looseness=1.1 (SR);
\end{tikzpicture}
\end{document}
使っている制御点を可視化したもの
code:body2.tikz(tex)
% Author: Izaak Neutelings (November, 2018)
% page 8 https://archive.org/details/StaticAndDynamicElectricity
% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz
% https://tex.stackexchange.com/questions/412899/tikz-calculate-and-store-the-euclidian-distance-between-two-coordinates
\begin{document}
% BODY charge distribution
\begin{tikzpicture}scale=0.8 %x={(1,0)},y={(0.5,1)}%,z={(0.73cm,0.73cm)}
\tikzset{
charged/.style={top color=blue!20,bottom color=blue!40,middle color=blue!30,shading angle=20},
every node/.style={circle,fill=gray}
}
\coordinate (B) at (4.1,-0.2);
\coordinate (L) at (0.0, 1.9);
\coordinate (TL) at (1.1, 3.5);
\coordinate (TM) at (3.1, 3.4);
\coordinate (T) at (6.1, 5.5);
\coordinate (R) at (7.8, 3.5);
\coordinate (SL) at (4.5, 3.7);
\coordinate (SR) at (6.7, 3.3);
\drawcharged
(B)node{B} toout= 10,in=-90
(R)node{R} toout= 90,in= 0
(T)node{T} toout=180,in= 60
(TM)node{TM} toout=162,in= 20
(TL)node{TL} toout=200,in=90
(L)node{L} toout=-90,in=190 cycle;
\draw (TM) toout=162-180,in=144 ++(0.3,-0.15);
\draw % "smiley"
(SL)node{SL} toout=-50,in=-150,looseness=1.1 (SR)node{SR};
\end{tikzpicture}
\end{document}
\path plotにsmooth cycle optionを入れても描けそう
pgf./tikz/smooth:cycle | Plots of Functions - PGF/TikZ Manual
この質問の図を見て思いついた
#2024-01-29 17:32:39
#2024-01-22 16:04:49