Trexioas Xavier said:
Both actually, i would like to learn what would be the best way to render it and what kind of mathematics i should use to construct it.
Regarding rendering it with OpenGL, I'm not sure what the best approach is, but because there would likely be relatively little geometry and pixel coverage involved, it may not matter that much how you do it. In e.g. OpenGL ES or earlier versions of OpenGL I'd probably just use streaming geometry and a dynamically modified mesh (which could be appropriate given that you said you want to be able to modify the effect dynamically). There might be more sophisticated techniques you could use in newer versions of OpenGL, but I've mostly been using ES 2 and haven't really kept up on those features.
For the geometry, the first thing that comes to mind is to use standard billboarding techniques for each segment. You could alpha-fade the end of each segment to avoid obvious discontinuities at the nodes.
It's been a while since I've done the math for that type of billboarding, but I think it might be something like this. One axis for the billboard is parallel to the line segment direction, which is easy. For the 'side' axis, compute the normalized cross product of the first axis and a vector from the billboard center to the camera position. The 'face' axis (perpendicular to the billboard surface) is then the cross product of the first two axes.
Whether or not I got the math right, the idea is to align the billboard 'as much as possible' towards the camera. (With other billboard types you can align towards the camera exactly, but with this type of billboard there's an additional constraint.) Note that if the billboard direction axis is pointed (more or less) straight at the camera, the math may fail, so that should be checked for (in that case you could just skip the billboard, or choose an arbitrary 'spin' orientation for it).