How can I draw this cone exactly?
Base on JohnKormylo'comment and use \pgfmathsetmacro\th{70}
, I solved my problem.
\documentclass[border=2mm,tikz]{standalone}
\usepackage{fouriernc}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc,backgrounds}
\usepackage{tkz-euclide,amsmath}
\usetkzobj{all}
\usepackage{pgfplots}
\begin{document}
%polar coordinates of visibility
\pgfmathsetmacro\th{70}
\pgfmathsetmacro\az{110}
\tdplotsetmaincoords{\th}{\az}
%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}]
\path
coordinate (O) at (0,0,0)
coordinate (B) at (0,\R,0)
coordinate (A) at ($(O) + (-30:{\R} and {\R})$)
%coordinate (A) at (\R/2,0.8660254038*\R,0)
coordinate (S) at (0,0,\v)
coordinate (C) at ($(O)-(A)$)
coordinate (M) at ($(A)!.5!(B)$)
coordinate (H) at ($(M)!1/2!(S)$)
;
\foreach \v/\position in { B/below,O/left,A/below,S/above,M/below,H/right} {\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) (O)--(A) (O) -- (M) (S) -- (M) (O)--(B) (O)--(H);
\tkzMarkSegment[color=black,pos=0.5,mark=||](A,M)
\tkzMarkSegment[color=black,pos=0.5,mark=||](B,M)
%\draw [fill opacity=0.4,fill=green!80!blue] (S) -- (A) -- (C) -- cycle;
% % computation of tangential points
\pgfmathsetmacro\cott{{cot(\th)}}
\pgfmathsetmacro\fraction{\R*\cott/\v}
\pgfmathsetmacro\fraction{\fraction<1 ? \fraction : 1}
\pgfmathsetmacro\angle{{acos(\fraction)}}
% % angles for transformed lines
\pgfmathsetmacro\PhiOne{180+(\az-90)+\angle}
\pgfmathsetmacro\PhiTwo{180+(\az-90)-\angle}
% % coordinates for transformed surface lines
\pgfmathsetmacro\sinPhiOne{{sin(\PhiOne)}}
\pgfmathsetmacro\cosPhiOne{{cos(\PhiOne)}}
\pgfmathsetmacro\sinPhiTwo{{sin(\PhiTwo)}}
\pgfmathsetmacro\cosPhiTwo{{cos(\PhiTwo)}}
% % angles for original surface lines
\pgfmathsetmacro\sinazp{{sin(\az-90)}}
\pgfmathsetmacro\cosazp{{cos(\az-90)}}
\pgfmathsetmacro\sinazm{{sin(90-\az)}}
\pgfmathsetmacro\cosazm{{cos(90-\az)}}
% % draw basis circle
\tdplotdrawarc[tdplot_main_coords,thick]{(O)}{\R}{\PhiOne}{360+\PhiTwo}{anchor=north}{}
\tdplotdrawarc[tdplot_main_coords,dashed,thick]{(O)}{\R}{\PhiTwo}{\PhiOne}{anchor=north}{}
% % 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);
% % displaying original surface of the cone (rotated)
\end{tikzpicture}
\end{document}