Example: A Cone in 3D

Published 2012-04-28 | Author: Marco Daniel

Download as: [PDF] [TEX]  •  [Open in Overleaf]

A Cone in 3D

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de. En français: TeXnique.fr.

% A cone in 3D
% Author: Marco Daniel


\draw[thick] (\RI,0)
  \foreach \x in {0,300,240,180} { --  (\x:\RI) node at (\x:\RI) (R1-\x) {} };
\draw[dashed,thick] (R1-0.center)
  \foreach \x in {60,120,180} { --  (\x:\RI) node at (\x:\RI) (R1-\x) {} };
\path[fill=gray!30] (\RI,0)
  \foreach \x in {0,60,120,180,240,300} { --  (\x:\RI)};

\draw[thick,fill=gray!30,opacity=0.2] (\RII,0)
  \foreach \x in {0,60,120,180,240,300,360}
    { --  (\x:\RII) node at (\x:\RII) (R2-\x) {}};

\foreach \x in {0,180,240,300} { \draw (R1-\x.center)--(R2-\x.center); };
\foreach \x in {60,120} { \draw[dashed] (R1-\x.center)--(R2-\x.center); };



  • #1 Jeff Hein, April 28, 2012 at 11:32 p.m.

    Glad to see the tikz-tdplot package is still useful to people!

  • #2 Marco Daniel, April 29, 2012 at 10:20 a.m.

    @Jeff Hein: It's a great package and I use it very often. Thanks

  • #3 Troy Kang, October 13, 2013 at 1:42 a.m.

    Hi, I'm little confused at the command { -- (\x:\RI) node at (\x:\RI) (R1-\x) {} }, someone willing explain it? Thanks a lot!

Adding comments is currently not enabled.

Scientific and technical areas


LaTeX Beginners Guide

Limited discount 50%
coupon code tDRet6Y

Creative Commons License