color blending/mixing with Java 2D

J

jakester

I have a bunch of lines criss-crossing. I want to be able to blend the
intersections of these lines in an additive manner. Is this possible
in Java? I know one can blend colors, but for many many lines, how do
I detect the intersection points and blend just those points? Is this
supported out of the box with Java?
 
J

John B. Matthews

jakester said:
I have a bunch of lines criss-crossing. I want to be able to blend
the intersections of these lines in an additive manner. Is this
possible in Java? I know one can blend colors, but for many many
lines, how do I detect the intersection points and blend just those
points? Is this supported out of the box with Java?

The AlphaComposite class "implements basic alpha compositing rules for
combining source and destination colors ... described [by] T. Porter and
T. Duff". Here's a toy with which to experiment:

<http://sites.google.com/site/drjohnbmatthews/composite>

Finding the intersection of lines in 2-space is an entertaining problem,
but I suspect that a transparent background, middling alpha and a
suitable rule will preclude the need.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top