3D-Drohne und Euler-Winkel

3D-Drohne und Euler-Winkel

Ich möchte Tikz verwenden, um das Bild zu zeichnen, das ich hochgeladen habe. Ich kann keine Winkel angeben und etwas Ähnliches wie das Bild erstellen.Bildbeschreibung hier eingeben

\documentclass{article}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}

\fill[black!50] (2.5,1) ellipse (1 and 0.5);

%\fill[black!50][rotate=-30] (-2.5,1) ellipse (1.5 and 0.5);

\fill[black!50] (-2.5,1) ellipse (1 and 0.5);

\fill[black!50] (2.5,-1) ellipse (1 and 0.5);

\fill[black!50] (-2.5,-1) ellipse (1 and 0.5);

\fill[black!50] (-0,-0) ellipse (1.5 and 0.5);

\draw[black, ultra thick] (1.,.4) -- (2.5,1);

\draw[black, ultra thick] (-1.,.4) -- (-2.5,1);

\draw[black, ultra thick] (1.,-.4) -- (2.5,-1);

\draw[black, ultra thick] (-1.,-.4) -- (-2.5,-1);


\end{tikzpicture}
\end{document}

Antwort1

TikZ ist vielleicht nicht das beste Tool für Diagramme in 3D, bietet aber Unterstützung in Form der 3dund der perspectiveBibliothek.

Darüber hinaus gibt estikz-3dplotUndtikz-3dtools.

Ich bin mir nicht sicher, wie Ihr blaues Koordinatensystem funktioniert und wie es in der Welt liegt. Das blauejAchse ist in Bezug auf die rot gestrichelte Hauptachse definiert, was es einfach macht, einen Bogen zwischen ihnen zu zeichnen. Die anglesBibliothek funktioniert nur in derLeinwandKoordinatensystem (das mit den Einheiten), das immer 2D ist.

Code

\documentclass[tikz]{standalone}
%\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{3d, arrows.meta, calc, quotes}
\begin{document}
\begin{tikzpicture}[
  x = ( 20:-2cm), y = (-30: 2cm), z = ( 80: 1.6cm),
  > = Triangle]
\draw coordinate (O) (0,0,-.05) ellipse [radius=.2];

\foreach \xy/\yx in {x/y, y/x} {
  \fill[white] (xyz cs: \xy = -1, \yx = -.05) -- (xyz cs: \xy =  1, \yx=-.05)
            -- (xyz cs: \xy =  1, \yx =  .05) -- (xyz cs: \xy = -1, \yx= .05) -- cycle;
  \foreach \lmr in {-.05, 0, .05}
    \draw[gray] (xyz cs: \xy=-1, \yx = \lmr) -- (xyz cs: \xy=1, \yx=\lmr);
  \draw[fill=white, radius=.15] (xyz cs: \xy = -1) ellipse[]
                                (xyz cs: \xy =  1) ellipse[];
}
\draw[fill=white] (O) ellipse [radius=.2];

\foreach \xyz/\Label/\Ang in {% \Ang needs to start with a ,
  x/left/ {, longitude = 70},
  y/right/{, longitude =-20},
  z/above/{, longitude = 70, latitude=70}%
} {
  \draw[->, densely dashed, red] (0, 0, 0) -- ++(xyz cs: \xyz= 1.5)
    coordinate (ax-\xyz) node[\Label] {$\xyz$};
  \draw[blue, ->]
     (0, 0, 0) -- (xyz spherical cs: radius = 1.5,/tikz/style/.expanded=\Ang)
      coordinate (ax-\xyz') node[\Label] {$\xyz$};
}

\draw[canvas is xy plane at z=0]
  (0, 1) arc[start angle=90, delta angle=20, radius=1]
  node[midway, below right] {$\varphi$};
\end{tikzpicture}
\end{document}

Ausgabe

Bildbeschreibung hier eingeben

verwandte Informationen