# Tag Info

36

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,->] (...

31

Well, no prizes for speed (not just because there is some duplication of calculations: TikZ is slow for this kind of stuff), but this shows one way of doing it. I expect asymptote/PSTricks could do it quicker, but I don't see any other way of doing it in TikZ. The maths is straightforward "back-of-the-envelope" trigonometry (in this case literally). The ...

27

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{...

22

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

20

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; ...

19

Asymptote solution. It uses a function (from the Wiki) to calculate the curve of intersection. Adjust the placement of the circles as needed. s.asy: size(300,300); size3(300,300,300); import graph3; currentprojection=orthographic(-5,-4,2,center=true); guide3 sphere_x_cyl(real a, real r, real R, int n=10){ // return a closed curve of the Sphere–cylinder ...

19

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).

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) --...

16

\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

Would you possibly mean something like the following picture? It's quite easy once you understand the basic limitation of arc: it only works on 2D planes. This means that if you simply define a 3rd coordinate system that lies perpendicular to the second and is aligned in a way that the points of x'+alpha0 and z' are coincident with the plane, you will be ...

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

13

Here are the first and the last. The ball takes some more time: Edit Improved the drawing of the axis, which is not covered and added third sketch Edit 2 Changed the intersection point with the sphere and plane drawing for a more beautiful output. Corners are now calculated with the help of analytical geometry, \documentclass[tikz,border=3mm]{standalone}...

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