I am not sure if I understood here everything right, because making a gradient transparenty is very simple. It´s creating a gradient image in the alpha channel, using gaussian blur or a gradient fill tool.
The sorting problem has only somthing to do with the number of the vertices. Vertices created with lower numbers are rendered behind vertices with higher numbers in transparent mode. The sorting script sounds very interesting.


:L