Fork me on GitHub
#quil
<
2016-11-20
>
lspector04:11:40

Is there a way to use quil for drawing but not in a draw loop? I have a long (hours/days) running process and I'd like to draw something derived from the state periodically. I know I could break the long-running process into chunks and in do a chunk of work and make the drawing in the draw function, which would loop. But I'd rather not have to rework the long-running process. I'd like to just insert calls within it that cause drawing to happen... but I don't know how to use quil in this way. Is it possible?

blueberry11:11:41

@lspector It is possible to solve the problem, although the solution is a bit different from what you describe, but it requires much more explanations than is possible in this chat interface. Processing: A Programming Handbook for Visual Designers etc. has this covered.

lspector14:11:20

@blueberry Thanks. I have that book and have just looked through it but don't see what you're referring to. Could you orient me to the relevant section?

lspector14:11:05

I've been thinking that maybe the right approach would be to somehow start in parallel (with a send to an agent?) my long-running process and a quil sketch. The quil sketch could just loop doing nothing until the long-running process indicates that there's something to draw, by putting it in a global atom, and when that happens the quil sketch would draw it (and then resume looping doing nothing until this happens again). Does that seem like a reasonable approach, or is there something better?