We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Processing and Java: Low Priority Drawing Thread
Page Index Toggle Pages: 1
Processing and Java: Low Priority Drawing Thread (Read 1061 times)
Processing and Java: Low Priority Drawing Thread
Jun 22nd, 2009, 9:04am
 
Hi,
for my course project in university, I'm going to implement an evolutionary algorithm for picture-segmentation. The genotype is written in Java. I use Processing for display and evaluation. If it would work...

The genotype contains coordinates, which are transformed to a displayable curve (phenotype). The problem is situated somewhere between displaying and evaluation.

After getting one genotype from the Java-Class, it's decoded to a list of coordinates (displayable). But when it should be displayed, nothing happens. The screen still shows, what was on it before. It's necessary to display the curve in order to run the evaluation function.
So, when this function is started, the program-code runs. But not on the right set of data (which shall be the curve created before).

I'm confused, because I tried several combinations of draw(), background() etc. functions to clear the screen and get the new curve to display. Without success.

The cause of the problem is still unclear. When I should guess, it has something to do with the thread-priority of processing / Java. Maybe there is some delay time before displaying on the screen. But i don't know.

My question is, if anyone may have a hint for this problem.

Thanks in advance, Stefan
Re: Processing and Java: Low Priority Drawing Thread
Reply #1 - Jun 22nd, 2009, 1:44pm
 
You description is too generic to allow us to help you, I fear.
Maybe you can try and show the general logic of your program, without the "hard" (lengthly) parts, with some base drawing/computation. Sometime the solution is simple but blurred by complex environment.
Page Index Toggle Pages: 1