For a mapping project I am looking for a method how to visualize a polyline where the ends increase in opacity such that it will look like its fades away using QGIS 3.10.10. See the red circle in the picture below.
In essence I am looking to style a polyline the way you would a DEM; with a color ramp that has 0% opacity at the lowest and highest values but instead of measures of height it would be of length. So, like a shape burst fill but for lines, I can imagine I have to play around with the geometry generator.
One solution would be to divide the polyline in several segments at fixed distances and give each segment an increased transparency, however I am looking for a less cumbersome and more robust method.
The result is purely for visual output e.g. the attribute table is not of importance.