荷電リングのxyz平面を描く

荷電リングのxyz平面を描く

これをレポートの 1 つとして描きたいのですが、方法がわかりません。

ここに画像の説明を入力してください

答え1

以前コメントで示した Mathcha を使用して均一に充電されたリングをあなたに寄付します。

ここに画像の説明を入力してください

\documentclass[a4paper,12pt]{article}
\usepackage{newtxtext,newtxmath}
\usepackage{tikz}

\begin{document}

\begin{figure}[h]
\centering


\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt        

\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
%uncomment if require: \path (0,444); %set diagram left start at 0, and has height of 444

%Shape: Arc [id:dp796341774674139] 
\draw  [draw opacity=0] (262.37,163.17) .. controls (263.64,157.97) and (266.21,153.41) .. (269.66,149.76) -- (291.5,170.33) -- cycle ; \draw   (262.37,163.17) .. controls (263.64,157.97) and (266.21,153.41) .. (269.66,149.76) ;
%Shape: Arc [id:dp46939057871839585] 
\draw  [draw opacity=0] (356.12,162.23) .. controls (355.71,167.57) and (353.93,172.5) .. (351.13,176.67) -- (326.2,159.96) -- cycle ; \draw   (356.12,162.23) .. controls (355.71,167.57) and (353.93,172.5) .. (351.13,176.67) ;
%Straight Lines [id:da14186153692575143] 
\draw [color={rgb, 255:red, 245; green, 166; blue, 35 }  ,draw opacity=1 ][line width=2.25]    (308.75,164) -- (388.71,187.9) ;
\draw [shift={(393.5,189.33)}, rotate = 196.64] [fill={rgb, 255:red, 245; green, 166; blue, 35 }  ,fill opacity=1 ][line width=0.08]  [draw opacity=0] (14.29,-6.86) -- (0,0) -- (14.29,6.86) -- cycle    ;
%Straight Lines [id:da24228394907316253] 
\draw [color={rgb, 255:red, 245; green, 166; blue, 35 }  ,draw opacity=1 ][line width=2.25]    (308.75,164) -- (392.64,143.52) ;
\draw [shift={(397.5,142.33)}, rotate = 526.28] [fill={rgb, 255:red, 245; green, 166; blue, 35 }  ,fill opacity=1 ][line width=0.08]  [draw opacity=0] (14.29,-6.86) -- (0,0) -- (14.29,6.86) -- cycle    ;
%Shape: Donut [id:dp6846402688267834] 
\draw   (81.5,164) .. controls (81.5,108.77) and (98.18,64) .. (118.75,64) .. controls (139.32,64) and (156,108.77) .. (156,164) .. controls (156,219.23) and (139.32,264) .. (118.75,264) .. controls (98.18,264) and (81.5,219.23) .. (81.5,164)(72.5,164) .. controls (72.5,103.8) and (93.21,55) .. (118.75,55) .. controls (144.29,55) and (165,103.8) .. (165,164) .. controls (165,224.2) and (144.29,273) .. (118.75,273) .. controls (93.21,273) and (72.5,224.2) .. (72.5,164) ;
%Shape: Axis 2D [id:dp8209371942963568] 
\draw  (78.57,164) -- (480.33,164)(118.75,24.5) -- (118.75,179.5) (473.33,159) -- (480.33,164) -- (473.33,169) (113.75,31.5) -- (118.75,24.5) -- (123.75,31.5)  ;
%Straight Lines [id:da9986252650298479] 
\draw    (118.75,164) -- (38.75,264.44) ;
\draw [shift={(37.5,266)}, rotate = 308.53999999999996] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-4.9) .. controls (6.95,-2.3) and (3.31,-0.67) .. (0,0) .. controls (3.31,0.67) and (6.95,2.3) .. (10.93,4.9)   ;
%Rounded Rect [id:dp709019453920531] 
\draw  [fill={rgb, 255:red, 245; green, 166; blue, 35 }  ,fill opacity=1 ] (76.58,209.59) .. controls (76.51,209.37) and (76.64,209.14) .. (76.86,209.07) -- (84.31,206.94) .. controls (84.54,206.88) and (84.77,207) .. (84.83,207.23) -- (92.27,233.18) .. controls (92.33,233.41) and (92.2,233.64) .. (91.98,233.7) -- (84.53,235.84) .. controls (84.31,235.9) and (84.08,235.77) .. (84.01,235.55) -- cycle ;
%Rounded Rect [id:dp44607882852530323] 
\draw  [fill={rgb, 255:red, 245; green, 166; blue, 35 }  ,fill opacity=1 ] (147.31,97.84) .. controls (147.25,97.63) and (147.39,97.41) .. (147.6,97.36) -- (154.77,95.6) .. controls (154.98,95.55) and (155.2,95.68) .. (155.25,95.9) -- (161.69,122.16) .. controls (161.75,122.37) and (161.61,122.59) .. (161.4,122.64) -- (154.23,124.4) .. controls (154.02,124.45) and (153.8,124.32) .. (153.75,124.1) -- cycle ;
%Straight Lines [id:da8011775407671766] 
\draw [color={rgb, 255:red, 74; green, 74; blue, 74 }  ,draw opacity=1 ][line width=1.5]    (118.75,164) -- (85.96,218.81) ;
\draw [shift={(84.42,221.39)}, rotate = 300.89] [color={rgb, 255:red, 74; green, 74; blue, 74 }  ,draw opacity=1 ][line width=1.5]    (14.21,-4.28) .. controls (9.04,-1.82) and (4.3,-0.39) .. (0,0) .. controls (4.3,0.39) and (9.04,1.82) .. (14.21,4.28)   ;
%Straight Lines [id:da30073330719810465] 
\draw [color={rgb, 255:red, 74; green, 74; blue, 74 }  ,draw opacity=1 ][line width=1.5]    (118.75,164) -- (149.94,112.57) ;
\draw [shift={(151.5,110)}, rotate = 481.24] [color={rgb, 255:red, 74; green, 74; blue, 74 }  ,draw opacity=1 ][line width=1.5]    (14.21,-4.28) .. controls (9.04,-1.82) and (4.3,-0.39) .. (0,0) .. controls (4.3,0.39) and (9.04,1.82) .. (14.21,4.28)   ;
%Shape: Circle [id:dp5131849801327677] 
\draw  [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ,fill opacity=1 ] (114.25,164) .. controls (114.25,161.51) and (116.26,159.5) .. (118.75,159.5) .. controls (121.24,159.5) and (123.25,161.51) .. (123.25,164) .. controls (123.25,166.49) and (121.24,168.5) .. (118.75,168.5) .. controls (116.26,168.5) and (114.25,166.49) .. (114.25,164) -- cycle ;
%Straight Lines [id:da23183967668813366] 
\draw  [dash pattern={on 4.5pt off 4.5pt}]  (154.5,110) -- (308.75,164) ;
%Straight Lines [id:da8296397184934552] 
\draw    (90.5,100.33) -- (118.75,164) ;
%Straight Lines [id:da3042917546526054] 
\draw    (234.5,179.33) -- (306.5,179.33) ;
\draw [shift={(309.5,179.33)}, rotate = 180] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (10.72,-5.15) -- (0,0) -- (10.72,5.15) -- (7.12,0) -- cycle    ;
%Straight Lines [id:da8852247752349167] 
\draw    (122.5,179.33) -- (215.5,179.33) ;
\draw [shift={(119.5,179.33)}, rotate = 0] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (10.72,-5.15) -- (0,0) -- (10.72,5.15) -- (7.12,0) -- cycle    ;
%Straight Lines [id:da42460233641055156] 
\draw  [dash pattern={on 4.5pt off 4.5pt}]  (84.42,221.39) -- (308.75,164) ;
%Straight Lines [id:da9037440476041276] 
\draw [color={rgb, 255:red, 126; green, 211; blue, 33 }  ,draw opacity=1 ][line width=2.25]    (308.75,164) -- (418.5,163.36) ;
\draw [shift={(423.5,163.33)}, rotate = 539.6700000000001] [fill={rgb, 255:red, 126; green, 211; blue, 33 }  ,fill opacity=1 ][line width=0.08]  [draw opacity=0] (14.29,-6.86) -- (0,0) -- (14.29,6.86) -- cycle    ;
%Shape: Circle [id:dp8200585017632998] 
\draw  [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ,fill opacity=1 ] (304.25,164) .. controls (304.25,161.51) and (306.26,159.5) .. (308.75,159.5) .. controls (311.24,159.5) and (313.25,161.51) .. (313.25,164) .. controls (313.25,166.49) and (311.24,168.5) .. (308.75,168.5) .. controls (306.26,168.5) and (304.25,166.49) .. (304.25,164) -- cycle ;

% Text Node
\draw (229,122) node [anchor=north west][inner sep=0.75pt]    {$r$};
% Text Node
\draw (99,101.73) node [anchor=north west][inner sep=0.75pt]    {$R$};
% Text Node
\draw (164,91.73) node [anchor=north west][inner sep=0.75pt]    {$dq_{2}$};
% Text Node
\draw (97,215.73) node [anchor=north west][inner sep=0.75pt]    {$dq_{1}$};
% Text Node
\draw (219,174) node [anchor=north west][inner sep=0.75pt]    {$x$};
% Text Node
\draw (454,169.73) node [anchor=north west][inner sep=0.75pt]    {$x$};
% Text Node
\draw (126,19.73) node [anchor=north west][inner sep=0.75pt]    {$y$};
% Text Node
\draw (40,232.73) node [anchor=north west][inner sep=0.75pt]    {$z$};
% Text Node
\draw (281,134.73) node [anchor=north west][inner sep=0.75pt]    {$P( x,0,0)$};
% Text Node
\draw (243,145.73) node [anchor=north west][inner sep=0.75pt]    {$\theta$};
% Text Node
\draw (362.13,164.07) node [anchor=north west][inner sep=0.75pt]    {$\theta$};
% Text Node
\draw (343,187.73) node [anchor=north west][inner sep=0.75pt]    {$d\vec{\mathbf E}_{2}$};
% Text Node
\draw (365,115.73) node [anchor=north west][inner sep=0.75pt]    {$d\vec{\mathbf E}_{1}$};
% Text Node
\draw (417,140.73) node [anchor=north west][inner sep=0.75pt]    {$d\vec{\mathbf E}_{x}$};

\end{tikzpicture}
\caption{Ring uniformly charged.}
\end{figure}
\end{document}

関連情報