均一な断面を持つ円筒形のワイヤーで作られた正方形のループ

均一な断面を持つ円筒形のワイヤーで作られた正方形のループ

私は、図に示すように、均一な断面を持つ太い円筒形のワイヤーでできた四角いループを地面に描いてみようとしていますSquare_Loop.png。このようなループを、太さのない線で描かれた長方形のフレームとして3Dでプロットすることは、PSTricksやTiでは非常に簡単なようです。Z. ただし、断面の次元を増やすことは決して簡単ではありません。ご協力ありがとうございます。

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

答え1

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d,angles,quotes}
\begin{document}
\tdplotsetmaincoords{70}{20}
\begin{tikzpicture}[tdplot_main_coords,thick]
 \draw[-stealth] (0,0,0) -- (6,0,0) node[below]{$x$};
 \draw[-stealth] (0,0,0) -- (0,-6,0) node[below right]{$y$};
 \draw[-stealth] (0,0,0) -- (0,0,4) node[left]{$z$};
 \begin{scope}[canvas is xy plane at z=0]
  \draw[rounded corners] (0,0) rectangle (2,-4);
  \draw[rounded corners] (0.2,-0.2) rectangle (1.8,-3.8);
  \node[fill,circle,inner sep=2pt,transform shape] (blob) at (1,-2){};
 \end{scope}
 \draw[dashed] (blob.center) -- (5,-2,0) coordinate(B) -- (5,-2,4) node[circle,draw,inner
 sep=1.5pt,solid,label=right:$A$](A){};
 \draw[-stealth] (blob.center) -- (A);
 \begin{scope}[canvas is xz plane at y=-2,transform shape]
  \pic[draw,angle radius=2cm,"$\alpha$",angle eccentricity=1.3] {angle=B--blob--A};
 \end{scope}
 \draw[semithick] (0,-4,0) -- (0,-4,1.5) (2,0,0) -- (2,0,1.5);
 \begin{scope}[canvas is yz plane at x=0,transform shape]
  \path (-4,1.2) -- (0,1.2) node[midway,above,transform shape=false]{$b$};
  \pgflowlevelsynccm
  \draw[stealth-stealth] (-4,1.2) -- (0,1.2);
 \end{scope} 
 \begin{scope}[canvas is xz plane at y=0,transform shape]
  \path (2,1.2) -- (0,1.2) node[midway,above,transform shape=false]{$a$};
  \pgflowlevelsynccm
  \draw[stealth-stealth] (2,1.2) -- (0,1.2);
 \end{scope} 
\end{tikzpicture}
\end{document}

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

3D 効果に関しては失敗しました。これが妥当な時間内で思いついた最高のものです。

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d,angles,quotes,calc}
\begin{document}
\tdplotsetmaincoords{70}{20}
\begin{tikzpicture}[tdplot_main_coords,thick]
 \draw[-stealth] (0,0,0) -- (6,0,0) node[below]{$x$};
 \draw[-stealth] (0,0,0) -- (0,-6,0) node[below right]{$y$};
 \draw[-stealth] (0,0,0) -- (0,0,4) node[left]{$z$};
 \begin{scope}[canvas is xy plane at z=0,transform shape]
  \draw[rounded corners] (0,0) rectangle (2,-4);
  \draw[rounded corners] (0.2,-0.2) rectangle (1.8,-3.8);
  \node[fill,circle,inner sep=2pt,transform shape] (blob) at (1,-2){};
  \begin{scope}
   \clip[rounded corners] (0,0) rectangle (2,-4) 
   (1.8,-3.8) -| (0.2,-0.2) -- (1.8,-0.2) -- cycle;
   \shade[top color=black!80,bottom color=black!70,middle color=gray!50,
   shading angle=-35] (0.3,0.2) rectangle (1.7,-0.3);
   \shade[top color=black!80,bottom color=black!70,middle color=gray!50,
   shading angle=-35] (0.3,-4.1) rectangle (1.7,-3.6);
   \shade[top color=black!80,bottom color=black!70,middle color=gray!50,
   shading angle=52] (-0.2,-0.3) rectangle (0.3,-3.7);
   \shade[top color=black!80,bottom color=black!70,middle color=gray!50,
   shading angle=52] (1.6,-0.3) rectangle (2.1,-3.7);
   \begin{scope}
    \clip (0,0) rectangle (0.3,-0.3);
    \shade[ball color=gray!70] (0.3,-0.3) circle[radius=0.3];
   \end{scope}
   \begin{scope}
    \clip (2,0) rectangle (1.7,-0.3);
    \shade[ball color=white] (1.7,-0.3) circle[radius=0.3];
   \end{scope}
   \begin{scope}
    \clip (0,-4) rectangle (0.3,-3.7);
    \shade[ball color=gray!30] (0.3,-3.7) circle[radius=0.3];
   \end{scope}
   \begin{scope}
    \clip (1.7,-4) rectangle (2,-3.7);
    \shade[ball color=white] (1.7,-3.7) circle[radius=0.3];
   \end{scope}
  \end{scope}
 \end{scope}
 \begin{scope}[tdplot_screen_coords]
 \end{scope}
 \draw[dashed] (blob.center) -- (5,-2,0) coordinate(B) -- (5,-2,4) node[circle,draw,inner
 sep=1.5pt,solid,label=right:$A$](A){};
 \draw[-stealth] (blob.center) -- (A);
 \begin{scope}[canvas is xz plane at y=-2,transform shape]
  \pic[draw,angle radius=2cm,"$\alpha$",angle eccentricity=1.3] {angle=B--blob--A};
 \end{scope}
 \draw[semithick] (0,-4,0) -- (0,-4,1.5) (2,0,0) -- (2,0,1.5);
 \begin{scope}[canvas is yz plane at x=0,transform shape]
  \path (-4,1.2) -- (0,1.2) node[midway,above,transform shape=false]{$b$};
  \pgflowlevelsynccm
  \draw[stealth-stealth] (-4,1.2) -- (0,1.2);
 \end{scope} 
 \begin{scope}[canvas is xz plane at y=0,transform shape]
  \path (2,1.2) -- (0,1.2) node[midway,above,transform shape=false]{$a$};
  \pgflowlevelsynccm
  \draw[stealth-stealth] (2,1.2) -- (0,1.2);
 \end{scope} 
\end{tikzpicture}
\end{document}

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

関連情報