2

The following code produces (if you can call it like that) a sphere, a cone and the axis.

\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}

I drew the shape on Geogebra. However I do not like the result. Also I want to color the cone in grey. I don't how to color it (or what command to insert both in Geogebra or in tikz)

Any help on improving the shape and color the cone, would be grateful.

P.S: I use the following packages for re-creating the shape in LaTeX:

\usepackage{pgf,tikz}
\usepackage{tkz-tab}
\usetikzlibrary{shapes,snakes,arrows,backgrounds}
\usetikzlibrary{scopes,svg.path,shapes.geometric,shadows}

enter image description here

  • There are lots of similar questions on this site. Take a look at the ones linked on the right for a start. See, for example, this question. – cfr May 3 '15 at 3:58
2

It is easy if you do it with tikz and the code is more human readable.

\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}

enter image description here

| improve this answer | |

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.