Hi can someone please help me with Laguerre Gaussian beam(looks like a doughnut or vortex)?
Asked
Active
Viewed 605 times
4
-
1Like this https://tex.stackexchange.com/questions/333330/blurred-tikz-picture-hermite-gaussian-modes ? – Symbol 1 Feb 23 '19 at 04:37
-
The equation is very complex to plot. I am not sure if such functions are available on latex. It is called Laguerre polynomial. – RD1153 Feb 23 '19 at 04:51
-
2Here are additional possibilities. No, Laguerre polynomials are not too complex to be plotted, but this is a LaTeX site, so if you provide equations and an example, people will be happy to help you, but they are less eager to dig out from the internet and guess what you might want. – Feb 23 '19 at 05:02
1 Answers
16
Here is an attempt to draw the most complicated one I saw on google image.
\documentclass[tikz]{standalone}
\pgfdeclarefunctionalshading{Laguerre-Gaussian modes}{\pgfpoint{-25bp}{-25bp}}{\pgfpoint{25bp}{25bp}}{}{
% x y
2 copy % x y x y
exch atan % x y theta
4 mul % x y 4theta
cos % x y cos(4theta)
dup mul % x y cos^2(4theta)
3 1 roll % cos^2(4theta) x y
dup mul exch dup mul
add sqrt % cos^2(4theta) r
20 mul % cos^2(4theta) 20r
90 add % cos^2(4theta) 20r+90
cos dup mul % cos^2(4theta) cos(20r+90)
mul % cos^2(4theta)*cos(20r+90)
sqrt
}
\begin{document}
\tikz\path[shading=Laguerre-Gaussian modes](-10,-10)rectangle(10,10);
\end{document}
Symbol 1
- 36,855
-
1I would give +100 if I could. Do you know the postscript syntax, or do you use a tool to convert human readable instructions into this language? – Feb 23 '19 at 05:19
-
1@marmot The shading accepts a very restricted subset of postscript. See
PDF32000_2008.pdfAppendix B. I have some muscle memory inherited from the last time I answered the Hermite-Gaussian question. – Symbol 1 Feb 23 '19 at 05:25 -
1You can tell that it is not from an automatic tool because
cos(20r+90)should becos^2(20r+90)– Symbol 1 Feb 23 '19 at 05:28 -
1
-
1@marmot you said "I would give +100 if I could". Come on! You have zillions of points to give ;) – Kpym Mar 24 '19 at 21:05
-
1
-

