# Tag Info

37

One option using TikZ: The code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[xscale=0.8,>=latex] % axis \draw[ultra thick,->] (0.3,-3.5) -- +(0,7) node[yshift=5pt] {$\mu$}; \draw[ultra thick,->] (0.3,-3.5) -- +(220:4) node[yshift=-5pt,xshift=-5pt] {$p$}; \draw[ultra thick,->] (...

27

It is always hard to get answers to questions on the form "draw this for me" without showing any effort your self. Next time try to start a solution and add a MWE to your question, then you have much higher chance of getting someone to dig into your problem. Here I guess the problem is the equator, where you can use \arc with different x- and y-radius. \...

26

It is much easier to just draw everything in the correct order instead of using 3d coordinates (or layers). The crucial part is the last dozen of lines: \documentclass{standalone} \usepackage{xifthen} \usepackage{tikz} \usetikzlibrary{math} \begin{document} \begin{tikzpicture} \newdimen\r \newdimen\R \newcount\n \tikzmath{ \n = 19; ...

24

Here's an alternative using Asymptote. It fulfills some version of most of your requests; for instance, the colors are defined in the preamble (but in Asymptote code rather than TeX code, so you might need to define TeX versions separately). % To run: pdflatex --shell-escape filename.tex \documentclass[margin=10pt,convert]{standalone} \usepackage{...

21

Using Asymptote. The surface $\beta$ has an element of randomness to it; to see other possibilities, change the integer in the srand(int); command. The routine to compute the intersection of the two Bezier patches is one I designed for this scenario; it will not work more generally. Here's the Asymptote code: settings.outformat="png"; settings.render=16; ...

20

You can copy-and-paste LaTeX directly from a Mathematica notebook: It is assumed the content is math-related, so non-math functions are set using \text (requires amsmath).

19

With TikZ this is easy to draw using pics, styles and the 3d library: \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{3d} \tikzset {% front face/.style={fill=gray!20,canvas is xy plane at z=1}, up face/.style={fill=gray!50,canvas is xz plane at y=1}, east face/.style={fill=gray!80,canvas is yz plane at x=1}, pics/square/.style={ ...

18

You can use object=fusion to merge all the spheres to a single object. For that you must also set the option solidmemory: \documentclass[11pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{pstricks,pst-solides3d} \begin{document} \begin{pspicture}(-6,-6)(6,6) \psset{viewpoint=100 100 100,Decran=150} \axesIIID[showOrigin=true,mathLabel=false,...

18

Using the assumption that cross-sections behave as rigid bodies: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture}[ declare function={squarex(\t) = (\t < 0.25) ? 1 : ( (\t < 0.5) ? (1 - (\t-0.25) * 8) : ( (\t < 0.75) ? -1 : (-1 + (\t - 0.75) * 8) ...

17

This is one possibility via tikz-3dplot Code \documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{shapes,calc,positioning} \tdplotsetmaincoords{70}{120} \begin{document} \begin{tikzpicture}[scale=2, tdplot_main_coords,axis/.style={->,dashed},thick] % -- remove these 3 lines if no axis is preferred \draw[axis] (-4, 0, 0) --...

17

\listfiles \documentclass[pstricks]{standalone} \usepackage{pst-solides3d} \begin{document} \def\A{3.0} \def\B{0.5} \begin{pspicture}(-3.5,-3.5)(3.2,13) \psset[pst-solides3d]{viewpoint=20 -20 30 rtp2xyz,Decran=15,lightsrc=viewpoint} \defFunction[algebraic]{shell}(u,v)% {\A*cos(u)*sin(v)}% {\A*sin(u)*sin(v)}% {\A*(cos(v)+ln(tan(v/2))) + \B*u} \...

15

Here is another solution made with plain tikz. We only have to draw lines and ellipses, but we need to do the maths. I use isometric axes and the maths are nearly the same as in the OP, but we need a couple of additional calculations for the tangent points. It's easy to obtain Q (see the drawing) but not so easy to obtain P, so I'm drawing it "by hand&...

14

Here is one way to do it which adapts the code you were already using to draw the cylinders (i.e. using ellipses). This method uses the intersections library to calculate the intersection point of a line drawn radially out from the centre of the ellipse to the edge of the ellipse. \documentclass[tikz,margin=0.5cm]{standalone} \usetikzlibrary{intersections}...

14

With some calculations, I have this code \documentclass[border=2mm,12pt,tikz]{standalone} \usepackage{tikz-3dplot-circleofsphere} \usepackage{fouriernc} \begin{document} \tdplotsetmaincoords{60}{140} \begin{tikzpicture}[tdplot_main_coords,scale=1/2,line join = round, line cap = round,declare function={R=6;r=4;h=2*sqrt(5); Angle=acos(r/R);}] \path (-3, -4,...

13

\documentclass[10pt,a4paper]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.3} \begin{document} \begin{tikzpicture} \begin{axis}[ %hide axis, xlabel=$x$,ylabel=$y$, mesh/interior colormap name=hot, colormap/blackwhite, ] \addplot3[domain=-3:3,surf,samples=41] {x*y*sin(deg(x^2+y^2))}; \end{axis} \end{tikzpicture} \end{document}

Only top voted, non community-wiki answers of a minimum length are eligible