2

I use pgfplots to render the mesh of a truncated cone in a 3D coordinate system like this:

\documentclass[border=2pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ 
            view={15}{30},
            axis lines=center, 
            ticks = none,
            scaled ticks=false,
            enlarge x limits=0.25,  
            enlarge y limits=0.85,
            enlarge z limits=0.55,
            axis on top=true,
            x axis line style={opacity=0.5},
            y axis line style={opacity=0.5},
            z axis line style={opacity=0.5},
            y label style={at={(axis description cs:0.4, 0.73)},anchor=north},
            xlabel={$x$}, ylabel={$-z$}, zlabel={$y$}
            ]           
\addplot3[patch, opacity=0.7, patch table={indices.txt}] file {points.txt};
\end{axis}
\end{tikzpicture}
\end{document}

The current result:

Truncated Cone

I would also like to include an indication of the axis rotation similar to this thread: Circular arrow in 3D to indicate a unit axis rotation

Rotations

Is that possible with pgfplots?

3

Here is a MWE you could work with :

\documentclass[border=2pt]{standalone}
\usepackage{pgfplots}
\usepackage{tikz-3dplot}
\pgfplotsset{width=7cm,compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
            view={15}{30},
            axis lines=center, 
            ticks = none,
            scaled ticks=false,
            axis equal,
            enlarge x limits=0.25,  
            enlarge y limits=0.85,
            enlarge z limits=0.55,
            axis on top=true,
            x axis line style={opacity=0.5},
            y axis line style={opacity=0.5},
            z axis line style={opacity=0.5},
            y label style={at={(axis description cs:0.4, 0.73)},anchor=north},
            xlabel={$x$}, ylabel={$-z$}, zlabel={$y$}]
  \addplot3[patch, opacity=0.7, patch table={indices.txt}] file {points.txt};
  \begin{scope}[canvas is yz plane at x=100]
    \draw [->] (30,0,0) arc (0:-350:30);
  \end{scope}
  \begin{scope}[canvas is xy plane at z=100]
    \draw [->] (30,0,0) arc (0:-350:30);
  \end{scope}
  \begin{scope}[canvas is xz plane at y=100]
    \draw [->] (30,0,0) arc (0:-350:30);
  \end{scope}
\end{axis}
\end{tikzpicture}
\end{document}

example

  • Looks great, thank you very much! I will see how I can make use of this! – ekk Sep 25 '16 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.