I see at Add an angle to a sphere to draw a cone in 3D. I tried

 \pgfmathsetmacro{\R}{4} % radius
 \pgfmathsetmacro{\myang}{150} % latitude angle of the red circle
 \coordinate (O) at (0,0,0);

 \begin{scope}[canvas is xy plane at z={-\R*sin(\myang)},transform shape]
  % \angVis from https://tex.stackexchange.com/a/49589/121799
  \begin{scope}[on background layer]
   \draw[] (\angVis:{\R*cos(\myang)}) arc (\angVis:180-\angVis:{\R*cos(\myang)});
  \draw[dashed] (180-\angVis:{\R*cos(\myang)}) arc (180-\angVis:360+\angVis:{\R*cos(\myang)});
  \path (0:{\R*cos(\myang)}) coordinate (R) 
  (180:{\R*cos(\myang)}) coordinate (L);
 \begin{scope}[on background layer]
 \coordinate (H) at ($ (L)!0.5!(R) $);
   \draw[] (L) -- (O) (R) -- (O) ;
  \draw[dashed] (H) -- (O) (L) -- (R);
\fill (O) circle[radius=1pt] node[above] {$O$};
\fill (L) circle[radius=1pt] node[above] {$L$};
\fill (R) circle[radius=1pt] node[above] {$R$};

I got:

Enter image description here

I feel the edges OR and OL are not nice. How can I repair it?


1 Answer 1


Your cone with R= 4 and \myang = 150, then hight of cone equal to r*sin(\myang) = 2. I use the code of this question at here How can I draw this cone exactly? to draw your cone

%polar coordinates of visibility
%parameters of the cone
\pgfmathsetmacro\R{4} %radius of base
\pgfmathsetmacro\v{2} %hight of cone
\begin{tikzpicture} [scale=1, tdplot_main_coords, axis/.style={blue,thick}]
coordinate (O) at (0,0,0)
coordinate (A) at ($(O) + (-70:{\R} and {\R})$)
coordinate (B) at ($ (O) - (A) $)
coordinate (S) at (0,0,\v)
\foreach \v/\position in { B/right,O/below,A/left,S/above} {\draw[draw =black, fill=black] (\v) circle (1pt) node [\position=0.2mm] {$\v$};
\draw[thick] (S) -- (A) (S) -- (B);
\draw[dashed] (A) -- (B) (S)--(O)  ;
\pgfmathsetmacro\fraction{\fraction<1 ? \fraction : 1}

% % angles for transformed lines

% % coordinates for transformed surface lines

% % angles for original surface lines

% % draw basis circle

% % displaying tranformed surface of the cone (rotated)
\draw[thick] (0,0,\v) -- (\R*\cosPhiOne,\R*\sinPhiOne,0);
\draw[thick] (0,0,\v) -- (\R*\cosPhiTwo,\R*\sinPhiTwo,0);

enter image description here

Based on Schrödinger's cat'answer at Draw Cone intersected by a plane in Latex you can use

    \begin{tikzpicture}[tdplot_main_coords,declare function={h=2;R=4;},
    ({R*cos(\AngleOne)},{R*sin(\AngleOne)} ) coordinate (bl) 
    ({R*cos(\AngleTwo)},{R*sin(\AngleTwo)} ) coordinate (br)
    (0,0,0) coordinate (O)
    (0,0,h) coordinate (S)
    ({R*cos(-70)}, {R*sin(-70)},0) coordinate (A)
    ({R*cos(110)}, {R*sin(110)},0) coordinate (B)
    \begin{scope}[canvas is xy plane at z=0]
    \draw[hidden] (bl) arc[start angle=\AngleOne,
    end angle=\tdplotmainphi+\alphacrit,radius=R];
    \draw (bl) arc[start angle=\AngleOne,
    end angle=\AngleTwo,radius=R];
    \draw (S) -- (bl) (S) -- (br)  ;
    \draw[dashed] (S) -- (O) (A) -- (B);
    \foreach \p in {S,A,O,B}
    \draw[fill=black] (\p) circle (1.5 pt);
    \foreach \p/\g in {S/90,A/180,O/-90,B/0}
    \path (\p)+(\g:3mm) node{$\p$};

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .