带圆弧功能的部分椭圆无法正常工作

带圆弧功能的部分椭圆无法正常工作

我想绘制第二张图(Autocad 绘图)中看到的两个圆弧。这两个圆弧分别是这两个椭圆的一部分:

椭圆 1:

  • x 半径=10.15
  • y 半径=2.15
  • 中心=(0,0)

椭圆 2:

  • x 半径=14.4221
  • y 半径=3.0521
  • 中心=(0,0)
\documentclass[12pt,twoside,openright]{report}
    
    \usepackage{amsfonts,amssymb,amsmath,float,bm,tikz,subcaption,graphicx,textcomp,gensymb,pgfplots} \usetikzlibrary{patterns}
    
    \begin{document}    
    
    \begin{figure} [H]
        \centering
    
    \begin{tikzpicture}[thick, scale=0.5]
    
    \shadedraw[top color=gray, bottom color=gray!30!white, draw=black] (-5.6082,-4.3226) -- (-5.6082,0) arc(-180:0:5.6082 and 1.1869) -- (5.6082,-4.3226) arc(0:-180:5.6082 and 1.1869);
    \draw[dashed] (-5.6082,0) arc(180:0:5.6082 and 1.1869);
    \draw (-5.6082,0) -- (-5.6082,4.3226);
    \draw (5.6082,0) -- (5.6082,4.3226);
    \draw[teal,arrows=->] (0,0) -- (-10.9211,6.6104) node[pos=1,above=2pt]{$x$};
    \draw[teal,arrows=->] (0,0) -- (-13.0336,-3.2048) node[pos=1,below=2pt]{$y$};
    \draw[teal,arrows=->] (0,0) -- (0,8) node[pos=1,right=2pt]{$z$};
    \draw[violet,arrows=->] (0,0) -- (-11.8797,3.0548) node[pos=1,above=2pt]{$r$};
    \draw[violet,arrows=->] (-3.5638,0.9164) -- (-12.8766,-0.9233) node[pos=1,above=2pt]{$\theta$};
    \draw[violet,arrows=->] (0,0) -- (11.8797,-3.0548) node[pos=1,above=2pt]{$r$};
    \draw[violet,arrows=->] (3.5638,-0.9164) -- (12.8766,0.9233) node[pos=1,above=2pt]{$\theta$};
    \node[circle,fill,inner sep=2pt,label=below:{$\textbf{A}$}] at (-3.5638,0.9164){};
    \node[circle,fill,inner sep=2pt,label=above:{$\textbf{B}$}] at (3.5638,-0.9164){};
    \draw (-3.3527,2.0293) arc (149:166:10.15 and 2.15);
    \draw (-4.7599,2.8811) arc (149:346:14.4221 and 3.0521);
    \end{tikzpicture}
    % \caption{Sistema brazo-flotador}
    % \label{fig:sistema_brazo_flotador}
    \end{figure} 
    \end{document}

得到的弧:

获得圆弧

预期弧:

预期弧

答案1

由于该图是自动生成的,因此很难理解坐标和角度。 -所以我只是猜测所涉及的角度。 为了获得更好的结果,重新开始并在需要时使用极坐标会更容易。

\documentclass[tikz, border=1cm]{standalone}
\begin{document}
\begin{tikzpicture}[thick, scale=0.5]
\draw (-3.3527,2.0293) arc[start angle=110, delta angle=20, x radius=10.15, y radius=2.15];
\draw (-4.7599,2.8811) arc[start angle=110, delta angle=20, x radius=14.4221, y radius=3.0521];
\shadedraw[top color=gray, bottom color=gray!30!white, draw=black] (-5.6082,-4.3226) -- (-5.6082,0) arc(-180:0:5.6082 and 1.1869) -- (5.6082,-4.3226) arc(0:-180:5.6082 and 1.1869);
\draw[dashed] (-5.6082,0) arc(180:0:5.6082 and 1.1869);
\draw (-5.6082,0) -- (-5.6082,4.3226);
\draw (5.6082,0) -- (5.6082,4.3226);
\draw[teal,arrows=->] (0,0) -- (-10.9211,6.6104) node[pos=1,above=2pt]{$x$};
\draw[teal,arrows=->] (0,0) -- (-13.0336,-3.2048) node[pos=1,below=2pt]{$y$};
\draw[teal,arrows=->] (0,0) -- (0,8) node[pos=1,right=2pt]{$z$};
\draw[violet,arrows=->] (0,0) -- (-11.8797,3.0548) node[pos=1,above=2pt]{$r$};
\draw[violet,arrows=->] (-3.5638,0.9164) -- (-12.8766,-0.9233) node[pos=1,above=2pt]{$\theta$};
\draw[violet,arrows=->] (0,0) -- (11.8797,-3.0548) node[pos=1,above=2pt]{$r$};
\draw[violet,arrows=->] (3.5638,-0.9164) -- (12.8766,0.9233) node[pos=1,above=2pt]{$\theta$}; \node[circle,fill,inner sep=2pt,label=below:{$\textbf{A}$}] at (-3.5638,0.9164){}; \node[circle,fill,inner sep=2pt,label=above:{$\textbf{B}$}] at (3.5638,-0.9164){};
\end{tikzpicture}
\end{document}

坐标系中的圆柱体

相关内容