Graphics, Figures & Tables ⇒ Transverse Intensity Profile of a Laser Beam
Transverse Intensity Profile of a Laser Beam
Hi everybody,
I'm curious, if there is a way to realize a laser beam profile and its Gauss fit in the manner sketched in the uploaded files.
Thanks in advance
I'm curious, if there is a way to realize a laser beam profile and its Gauss fit in the manner sketched in the uploaded files.
Thanks in advance
- Attachments
-
- image3.png (16.86 KiB) Viewed 8292 times
-
- traverse-int.JPG (2.79 KiB) Viewed 8292 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Transverse Intensity Profile of a Laser Beam
The simplest solution I can think of is one with TikZ/PGF. It could look like this. The output is attached.
There is probably a more complicated solution (3D, color gradients, …). But this should be a good starting point.
Thorsten
Code: Select all
\documentclass[11pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[
scale=3,
samples=50,
declare function={mu=2;},
declare function={sigma=0.3;},
declare function={normal(\m,\s)=1/(2*\s*sqrt(pi))*exp(-(\x-\m)^2/(2*\s^2));}
]
\path[inner color=red] (1,1) rectangle (3,3);
\draw plot[domain=1:3] (\x,{normal(mu,sigma)});
\draw[rotate=90] plot[domain=1:3] (\x,{-normal(mu,sigma)});
\end{tikzpicture}
\end{document}
Thorsten
- Attachments
-
- ytmp.png (8.22 KiB) Viewed 8277 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Transverse Intensity Profile of a Laser Beam
@localghost
this looks really fantastic, thanks.
i have missed to say that i have the gaussian beam image done with a camera. i wanted to fit or put the bell-curve alongsides the image taken with the camera.
regards
this looks really fantastic, thanks.
i have missed to say that i have the gaussian beam image done with a camera. i wanted to fit or put the bell-curve alongsides the image taken with the camera.
regards
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Transverse Intensity Profile of a Laser Beam
If it's not a secret, you could attach that picture (perhaps with reduced resolution) to your next post. And perhaps you could describe how this fit should look as well as where and how it should be placed.thinkpadT wrote:[…] i have missed to say that i have the gaussian beam image done with a camera. i wanted to fit or put the bell-curve alongsides the image taken with the camera. […]
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Transverse Intensity Profile of a Laser Beam
@localghost
hi,
the picture is indeed not a secret, and it is attached in my first post (the black and white picture "traverse-int.JPG") and the fits i wanted is drawn with MS paint and they are supposed to be Gaussian and they should be placed in positions showed in that picture.
Now i have the picture and the fit done separately. I wanted to placed them like in the picture. That would be one way i would like to have them
But if there was a way to use Latex, TikZ or pgf plot and do that in one code would be also a great thing.
regards
hi,
the picture is indeed not a secret, and it is attached in my first post (the black and white picture "traverse-int.JPG") and the fits i wanted is drawn with MS paint and they are supposed to be Gaussian and they should be placed in positions showed in that picture.
Now i have the picture and the fit done separately. I wanted to placed them like in the picture. That would be one way i would like to have them
But if there was a way to use Latex, TikZ or pgf plot and do that in one code would be also a great thing.
regards
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Transverse Intensity Profile of a Laser Beam
That was not clear to me from your first post. The solution is still with TikZ/PGF. I have cut the picture to the relevant content and attached it to this post a well as the resulting output from the below code.thinkpadT wrote:[…] the picture is indeed not a secret, and it is attached in my first post (the black and white picture "traverse-int.JPG") and the fits i wanted is drawn with MS paint and they are supposed to be Gaussian and they should be placed in positions showed in that picture. […]
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\pgfdeclareimage[height=4cm]{beam}{transverse-intensity}
\begin{document}
\begin{tikzpicture}[
scale=2,
samples=50,
declare function={mu=1;},
declare function={sigma=0.3;},
declare function={normal(\m,\s)=1/(2*\s*sqrt(pi))*exp(-(\x-\m)^2/(2*\s^2));}
]
\node at (1,1) {\pgfuseimage{beam}};
\draw plot[domain=0:2] (\x,{-normal(mu,sigma)});
\draw plot[domain=0:2,rotate around={90:(1,1)}] (\x,{-normal(mu,sigma)});
\end{tikzpicture}
\end{document}
- Attachments
-
- The resulting output.
- ytmp.png (4.68 KiB) Viewed 8223 times
-
- The used graphics file.
- transverse-intensity.png (2.11 KiB) Viewed 8223 times
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Transverse Intensity Profile of a Laser Beam
@localghost
thanks, that looks very nice. that's exactly what i need.
using your code i get the gaussian profiles but not the image(
doing something wrong): . An additional question: is there a possibilty to put axis boxes with some number around the image, for example as drawn in the image in red.
regards
thanks, that looks very nice. that's exactly what i need.
using your code i get the gaussian profiles but not the image(

regards
- Attachments
-
- result.PNG (30.83 KiB) Viewed 8205 times
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Transverse Intensity Profile of a Laser Beam
It is possible to get a frame around the function, but I don't want to mess with Thorstens code right now.
Concerning the image: Can you please provide us with more information, is there any error message?
Concerning the image: Can you please provide us with more information, is there any error message?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Transverse Intensity Profile of a Laser Beam
See Johannes' remarks. The exact code in form of a minimal example would be helpful (if it differs from my code sample). The code works for me. Hence there must be something that prevents its functionality on your machine.thinkpadT wrote:[…] using your code i get the gaussian profiles but not the image( :? doing something wrong): […]
Why do you come only bit by bit which such important information? We could have done this in one go right at the beginning. This will require a completely new approach. And there's another problem: It is weekend and very nice weather here. So don't expect a solution before Monday (from me).thinkpadT wrote:[…] An additional question: is there a possibilty to put axis boxes with some number around the image, for example as drawn in the image in red. […]
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10