I am trying to find a way (desirably simple and performance/speed optimized for larger graphs) to do the following :
Styling graph vertexes by glow-effect and its intensity depending on
VertexWeight
Styling graph edges by glow-effect and its intensity depending on
EdgeWeight
DirectedEdge
glow-effect styling is desirable too (while for simplicity things can start atUndirectedEdge
)
For example for something like this:
RandomGraph[{20,100},
VertexWeight->RandomReal[1,20],
EdgeWeight->RandomReal[1,100],
Background->Black,
BaseStyle->White]
i am looking for a visual similar to this one below, except that edges need to glow too:
The issues that I am experiencing.
1. Simple implementation of a stunning glow
I've seen various glow effects (including THIS about glowing points) but not an expert on best visual vs performance ideas. Surprisingly also I have not seen much about glowing lines around. I'd naively start with something like this, but that's probably can be improved visually and performance-wise:
bsc=BSplineCurve[{{0,0},{1,1},{2,0}}];
Graphics[
Table[{White,Opacity[1/k^1.2],Thickness[.005k],CapForm["Round"],bsc},{k,20}],
Background->Black]
2. Passing weights to glow
While I am aware of VertexShapeFunction
and EdgeShapeFunction
, I am not quite sure how to optimally pass the weights to them... and if these properties are the right approach.
Glow in built-in functions
I've noticed that these functions produces some glow:
ComplexPlot[z^2+1,{z,-2-2I,2+2I},ColorFunction->"CyclicReImLogAbs"]
And as noticed by @E.C. in his answer below something like
ImageAdjust[DistanceTransform[Graphics[Point[RandomReal[1,{100,2}]]]]]
Thank you, your help is highly appreciated!