以下代码生成(如果可以这样称呼的话)一个球体、一个圆锥体和轴。
\definecolor{uuuuuu}
{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle45,x=0.6319115323854658cm,y=0.6230529595015575cm]
\clip(-5.8,-5.87) rectangle (6.86,6.97);
\draw(-0.06,1.18) ellipse (2.5276461295418633cm and 2.49221183800623cm);
\draw [rotate around={-0.0028361439127783258: (-0.06000197010244789,1.14019999024578)}] (-0.06000197010244789,1.14019999024578) ellipse (2.563576086468462cm and 0.42243278249466193cm);
\draw [dash pattern=on 2pt off 2pt] (-0.06,1.18)-- (-0.07,-2.84);
\draw (-0.06,1.18)-- (-0.06,6.52);
\draw (-0.07,-2.84)-- (5.87,-2.84);
\draw [dash pattern=on 2pt off 2pt] (-0.07,-2.84)-- (-4.87,-2.81);
\draw [dash pattern=on 2pt off 2pt] (-0.07,-2.84)-- (4.58,0.52);
\draw (-0.07,-2.84)-- (-3.28,-5.39);
\draw [line width=1.6pt] (-0.07,-2.84)-- (3.9369538990052764,1.0239246040321484);
\draw [line width=1.6pt] (-0.07,-2.84)-- (-4.056969330896825,1.024320303603237);
\draw (-3.52,-0.11) node[anchor=north west] {$\sqrt{2}R$};
\draw (-0.06052244670647568,0.9699764239967823)-- (3.9369538990052764,1.0239246040321484);
\draw (0.89,2.05) node[anchor=north west] {$R$};
\begin{scriptsize}
\draw [fill=black] (-0.07,-2.84) circle (1.5pt);
\draw [fill=uuuuuu] (-0.06052244670647567,0.9699764239967822) circle (1.5pt);
\end{scriptsize}
\end{tikzpicture}
我在 Geogebra 上画了这个形状。但我不喜欢这个结果。我还想把圆锥体涂成灰色。我不知道如何给它上色(或者在 Geogebra 或 tikz 中插入什么命令)
如能得到有关改善锥体形状和颜色的任何帮助,我将不胜感激。
PS:我使用以下软件包在 LaTeX 中重新创建形状:
\usepackage{pgf,tikz}
\usepackage{tkz-tab}
\usetikzlibrary{shapes,snakes,arrows,backgrounds}
\usetikzlibrary{scopes,svg.path,shapes.geometric,shadows}
答案1
如果你用它做的话会很容易tikz
,而且代码也更易于阅读。
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[font=\tiny]
\fill[gray,opacity=0.5] (0,0) -- (2,1.98) -- (-2,1.98) -- (0,0) -- cycle;
\fill (0,0) circle (2pt);
\draw[shorten >= 2pt] (0,0) -- (2.02,2);
\draw[shorten >= 2pt] (0,0) --node[xshift=3mm]{$\sqrt{2}R$} (-2.02,2);
\filldraw[draw=black,outer color=gray!40,inner color=gray!5] (0,2) circle[x radius=2,y radius=0.3];
\fill (0,2) circle (2pt);
\draw (0,2) -- node[yshift=1mm]{$R$} (2,2) (0,2) -- +(0,2.5);
\draw[dash pattern=on 2pt off 2pt] (0,0) -- (0,2) ;
\draw[dash pattern=on 2pt off 2pt] (0,0) -- (-2.5,0) ;
\draw[dash pattern=on 2pt off 2pt] (0,0) -- (30:2.5) ;
\draw (0,0) -- (210:2) ;
\draw (0,0) -- (2,0) ;
\draw (0,2) circle (2);
\end{tikzpicture}
\end{document}