A tube of light in a volume shader As I had much fun with this (thx Chebhou) but gaussian functions are a bit too complex for me, i want my volume scatter cylinder to have simply a smaller cylinder emitting light inside it, from the same object/material. The same size all along, or why not being able to control the fading at one or both sides (why not asking :) )

It has to be done with math nodes, vectors and things like that (what I want to learn)

Something like this but in a single object


looks like a light saber :)
use this circle equation and chose a radius "max R = 0.5" :



Coordinates node group :  

and for fading on the sides i used a sin function :



render :