Focused Gaussian beam going through a plane I try to create a focused Gaussian beam which is going through the focal plane.

So far I tried a Volume scatter with a lot of lamps in the middle, which completely failed. 

For the second try I exported an intensity distribution with matlab and used this as an UV-map to control the transparency of a plane. My beam consists now of a lot of planes (see first picture) which is also not ideal because at the intersection with the focal plane there are some lines visible.

If I increase the transparency of the plane, the result is ok but I am not 100% satisfied (see second picture).

So my question is, if it is possible to create some kind of light or intensity distribution which I can tweak with functions, so that I have a Gaussian shape in the x-y-plane and a hyperbolic or quadratic shape in z-direction?

I already saw the previous question about a Gaussian beam, but unfortunately the blender files cannot be downloaded anymore and without I was not able to understand fully what was going on and the problem is also a bit different.



Here is a two dimensional plot of how the intensity distribution of a focused Gaussian beam should look like approximately.



The colormap is just for better illustration, for my image it should be only red. The important thing is that the width of the beam gets smaller in the middle where the plain is but also the intensity there gets higher.
You can create such a beam using a Volumetric Emission shader and some maths nodes.

The Gaussian distribution is as follows :

 

Create a mesh (eg, a cube) to act as the domain for the volumetrics. The Object coordinates will be used, passed through a Mapping node to allow it to be easily manipulated and scaled.

To to create a vertical beam you can calculate the square of the distance as 'x^2 + y ^ 2'. This can be used directly as the 'x^2' in the above equation.

All that remains is to scale the beam based on the square of the Z-coordinate.

This produces the following material :



You can adjust the Mapping node to vary the scaling along each of the X, Y, Z axis, adjust the 'Add' node to affect how tightly the beam is focused and adjust the Multiply node to affect the overall brightness of the beam.



Blend file attached 

EDIT : Just noticed the edit to add variation in intensity towards the focus. This can be easily achieved by driving the final Multiply for the intensity from the Z coordinate. eg, something like the following to focus the beam to a bright spot on the plane :