How we can draw the pre-image of the Hopf fibration in Tex?
For example, I mean the figure in page 73 of the prescribed link:
How we can draw the pre-image of the Hopf fibration in Tex?
For example, I mean the figure in page 73 of the prescribed link:
Welcome! The question how one may draw a torus has many answers, out of which I choose this one to start. This is because it comes with a parametrization of the projection of the torus on the screen coordinates and does not require external software. If you want to mass produce 3d drawings, you may be ultimately better off with asymptote, though. Given these parametrizations, it is rather easy to draw
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\tikzset{declare function={%
torusx(\u,\v,\R,\r)=cos(\u)*(\R + \r*cos(\v));
torusy(\u,\v,\R,\r)=(\R + \r*cos(\v))*sin(\u);
torusz(\u,\v,\R,\r)=\r*sin(\v);
vcrit1(\u,\th)=atan(tan(\th)*sin(\u));% first critical v value
vcrit2(\u,\th)=180+atan(tan(\th)*sin(\u));% second critical v value
thetacritA(\R,\r)=atan(sqrt(\R/\r-1));
thetacritB(\R,\r)=acos(\r/\R);
ucritA(\R,\r,\th)=180+(90/pi)*sqrt(abs(-(\R^2*pow(cot(\th),2))+4*pow(\r,2)/pow(sin(2*\th),2)))/\R;
ucritB(\R,\r,\th)=540-ucritA(\R,\r,\th);
umaxA(\R,\r,\th)=asin(sqrt(abs(-pow(cot(\th),2)+4*pow(\r,2)/(pow((sin(2*\th)*\R),2)))));
umaxB(\R,\r,\th)=180-umaxA(\R,\r,\th);}}
\tikzset{3d torus/.style n
args={2}{/utils/exec=\pgfmathsetmacro{\DDA}{int(sign(sin(thetacritA(#1,#2))-sin(\tdplotmaintheta)))}
\pgfmathsetmacro{\DDB}{int(sign(sin(thetacritB(#1,#2))-sin(\tdplotmaintheta)))},
insert path={
plot[variable=\x,domain=1:359,smooth cycle,samples=71]
({torusx(\x,vcrit1(\x,\tdplotmaintheta),#1,#2)},
{torusy(\x,vcrit1(\x,\tdplotmaintheta),#1,#2)},
{torusz(\x,vcrit1(\x,\tdplotmaintheta),#1,#2)})
\ifnum\DDA=1
plot[variable=\x,domain=0:360,smooth cycle,samples=71]
({torusx(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)},
{torusy(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)},
{torusz(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)})
\else
\ifnum\DDB=1
plot[variable=\x,domain={umaxA(#1,#2,\tdplotmaintheta)}:{umaxB(#1,#2,\tdplotmaintheta)},smooth,samples=71]
({torusx(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)},
{torusy(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)},
{torusz(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)}) --
plot[variable=\x,domain={180+umaxA(#1,#2,\tdplotmaintheta)}:{180+umaxB(#1,#2,\tdplotmaintheta)},smooth,samples=71]
({torusx(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)},
{torusy(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)},
{torusz(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)}) -- cycle
\fi
\fi
}},3d torus stretch/.style n args={2}{/utils/exec=\pgfmathsetmacro{\DDA}{int(sign(thetacritA(#1,#2)-\tdplotmaintheta))},
insert path={\ifnum\DDA=-1
plot[variable=\x,domain={ucritA(#1,#2,\tdplotmaintheta)}:{ucritB(#1,#2,\tdplotmaintheta)},smooth,samples=71]
({torusx(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)},
{torusy(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)},
{torusz(\x,vcrit2(\x,\tdplotmaintheta),#1,#2)})
\fi
}}}
\begin{document}
\tdplotsetmaincoords{65}{0}
\begin{tikzpicture}[tdplot_main_coords,declare function={
rfib(\x)=3*\x/sqrt(5+\x*\x);}]
\pgfmathsetmacro{\RadiusA}{3}
\pgfmathsetmacro{\RadiusB}{1}
\clip[tdplot_screen_coords]
(-\RadiusA-1.5*\RadiusB,{-(\RadiusA+1.5*\RadiusB)*sin(\tdplotmaintheta)})
rectangle
(\RadiusA+1.5*\RadiusB,{(\RadiusA+1.5*\RadiusB)*sin(\tdplotmaintheta)});
\draw (0,0,{-(\RadiusA+1.3*\RadiusB)*sin(\tdplotmaintheta)}) -- (0,0,0);
\begin{scope}[canvas is xz plane at y=0]
\foreach \X in {1.5,2.5,...,8.5}
{\draw ({-\RadiusA+rfib(\X)},0) arc(360:180:\X)
({\RadiusA-rfib(\X)},0) arc(180:360:\X);}
\end{scope}
\draw[thick,samples=71,fill=gray,fill opacity=0.8,even odd
rule,3d torus={\RadiusA}{\RadiusB}] ;
\draw[thick,samples=71,3d torus stretch={\RadiusA}{\RadiusB}];
\begin{scope}[canvas is xz plane at y=0]
\foreach \X in {1.5,2.5,...,8.5}
{\draw ({-\RadiusA+rfib(\X)},0) arc(0:180:\X)
({\RadiusA-rfib(\X)},0) arc(180:0:\X);}
\end{scope}
\draw[-stealth] (0,0,0)-- (0,0,{(\RadiusA+1.3*\RadiusB)*sin(\tdplotmaintheta)}) ;
\end{tikzpicture}
\end{document}
If you tell me what the purpose of the curve on the torus is, I may add it, too.
I was looking for a realistic Hopf fibration and found
https://i.stack.imgur.com/yFMf0.jpg
;-)
\usepackage{tikz-3dplot} and paste the \tikzset stuff somewhere. (The torus functions are also part of an experimental library, see https://github.com/tallmarmot/pgf/tree/master/experiments/Marmot/3dtools, but this has not yet been polished yet to the extent that it is publishable.)
–
Dec 21 '19 at 02:09
I fully realize the OP seeks an answer in LaTeX (tikz...), but sometimes you have to realize when there is a better tool for a job. I plotted the below in less than five minutes using Mathematica, with transparency, etc.... a figure that can easily be included as a .eps file in a LaTeX document.
If you have the mathematical form for the other planar curves, those can be easily added too.
In case anyone is interested:
myTorus =
ParametricPlot3D[
{Cos[v] (2 + Cos[u]), Sin[v] (2 + Cos[u]), Sin[u]},
{v, 0, 2 Pi}, {u, 0, 2 Pi},
PlotStyle -> Opacity[0.5],
Mesh -> None,
Boxed -> False,
Axes -> None];
myCurve =
ParametricPlot3D[
{Cos[2 t] (2 + Cos[3 t]), Sin[2 t] (2 + Cos[3 t]), Sin[3 t]},
{t, 0, 2 \[Pi]},
PlotStyle -> {Red, Thickness[0.02]}];
Show[myTorus, myCurve]