5

I am trying to draw a picture of a very simple sphere - i.e. one big black circle with additionally, an equator indicated with solid line in front, dotted in back.

on this sphere I want to draw a handful of circles that come about from the intersection of the sphere with a plane. These planes should all pass through the same point on the surface and share the same tangent vector there.

But all I can find in this regard is either planes through (an axis through) the center of the sphere, or parallel planes (i.e. latitude and longitude type circles). eg Draw parallels of a sphere with tikz or How do you draw spheres and arcs on a sphere on latex? , but I want all the circles to pass through one point and be parallel at that point.

Another explanation - imagine a line tangent to the sphere. Next imagine all planes that pass through this line. They each intersect the sphere in a circle, but only one of them will be a major circle (geodesic), the others will be smaller and off to the side.

Is it clear what I mean? Can someone point me in the right direction?

thank you all.

EDIT: Ok I will try to draw it by hand. You are correct that I should try. I am bad a sketching though :(

enter image description here enter image description here

5
  • So you want something like this?
    – Werner
    Aug 28, 2014 at 18:41
  • Just draw something in paint or your choice of poison. That would be much easier to explain and please show your code that at least draws a sphere.
    – percusse
    Aug 28, 2014 at 18:42
  • The equation of a sphere is (x-a)^2+(y-b)^2+(z-b)^2=r^2, and the equation of a plane can be, for example, Ax+By+Cz=D. You can find the curve of intersection and then change the parameters.
    – cmhughes
    Aug 28, 2014 at 19:00
  • ok I have added pictures. ... So Yes to Werner, something like that. Aug 28, 2014 at 19:25
  • I'm sure you'll get a quick answer, but I'll revisit your question over the weekend if not :)
    – cmhughes
    Aug 28, 2014 at 21:28

1 Answer 1

4

This is a deliberate stab and every thing is hard coded.

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{intersections,calc}
\begin{document}
  \begin{tikzpicture}[rotate=90]
    \path[use as bounding box] (0,-1.5) rectangle (3,1.5);
    \draw[blue,ball color=blue!20,name path global=circle] (1.5,0) circle (1.5 cm);
    \node[fill,circle,inner sep=0.5pt] (A) at (0,0){};
    \foreach \i in {70,60,...,0} {
      \path[name path global=plane\i,rotate = \i] (-0.1,0) -- (0:3.1cm);
      \path[name intersections={of=circle and plane\i,sort by=circle}];
      %
      \draw[rotate around ={\i:(0,0)}] let
        \p1 = ($ (A) - (intersection-1) $),
        \n1 = {veclen(\p1)}
        in  (A) arc (-180:0:{0.5*\n1} and {0.03*\n1});
      %
      \draw[dashed,rotate around ={\i:(0,0)}] let
        \p1 = ($ (A) - (intersection-1) $),
        \n1 = {veclen(\p1)}
        in  (A) arc (180:0:{0.5*\n1} and {0.03*\n1});
    }
    \foreach \i in {-70,-60,...,-10} {
        \path[name path global=plane\i,rotate = \i] (-0.1,0) -- (0:3.1cm);
        \path[name intersections={of=circle and plane\i,sort by=circle}];
        \draw[rotate around ={\i:(0,0)}] let
            \p1 = ($ (A) - (intersection-2) $),
            \n1 = {veclen(\p1)}
            in   (A) arc (-180:0:{0.5*\n1} and {0.03*\n1});
            %
            \draw[dashed,rotate around ={\i:(0,0)}] let
            \p1 = ($ (A) - (intersection-2)$),
            \n1 = {veclen(\p1)}
            in  (A) arc (180:0:{0.5*\n1} and {0.03*\n1});
    }
    \begin{scope}[rotate around ={90:(1.5,-1.5)}]
        \draw[red] (1.5,-1.5) arc (180:0:1.5 and {0.1*1.5});
        \draw[red,dashed] (1.5,-1.5) arc (-180:0:1.5 and {0.1*1.5});
    \end{scope}
\end{tikzpicture}
\end{document}

enter image description here

I think it should be like this:

enter image description here

Just interchange the signs of first two 180 in the arc.

5
  • :( I can't compile at all. been trying. What does this mean: ! Missing \endcsname inserted. <to be read again> \OT1\i Aug 29, 2014 at 21:05
  • Ok. this is all very strange. On its own, I can compile it if I take out the {scope} section. However if I paste this into my main document I get an error of missing \endcsname with a line reference of my next tikz picture much further down in the document. ... this is all very confusing. What does Missing \endcsname mean? Aug 29, 2014 at 21:28
  • @sheikyerboutiII Try updating your tex distribution.
    – user11232
    Aug 29, 2014 at 23:00
  • I have newest TeX from Ubuntu 14.04.1 I can't figure it out. something isn't working and I can't figure out the logic. :( This is a TeX error, right? not a LaTeX error. I can compile it on its own if I comment out the {scope} section or if I comment out both for loops. However, leaving in the scope section and just the first line of the first for loop ( \path[name path global=plane\i ... ) already gives me the endcsname error. and of course embedding it into a larger TeX document gives error either way.. If I understood what was causing it I could play around with the code, but I'm stumped Sep 2, 2014 at 16:47
  • It works with texlive 2014 and miktex 2.9. Texlive from ubuntu is,generally, old. Try to install texlive 2014.
    – user11232
    Sep 2, 2014 at 22:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .