views:

46

answers:

1

Hi,

I am having multiple points in a plane and some hundreds of lines pass through those points. Some points can have more lines passing through them than other points. I want to show some kind of more gradient or brightness associated with lines crowded together. Is this possible to do in java2d.

Please refer to this : http://ft.ornl.gov/doku/_media/ft/projects/paraxis.jpg

Thank you.

+2  A: 

That picture looks like just a bunch of lines drawn with a low alpha value - in other words, using a nearly transparent color. When you have a lot of lines close together, they'll overlap and the color will get brighter. So, assuming the picture shows the kind of effect you're looking for, just use one of the Color constructors with four arguments and specify a low alpha value for the last one (maybe 0.1 as a float, or 20-30 as an int), then go crazy drawing your lines ;-)

If that doesn't do what you want, maybe I misunderstood your question...

David Zaslavsky