Is there a way to artificially have different parts of code run at different speeds?
I'm working on a little sine simulator project to help me learn processing (
http://www.openprocessing.org/visuals/?visualID=44399). Currently I have a speed control which increases or decreases the speed that a graph is drawn. The speed is currently controlled by a framerate variable. However, even though this speeds up and slows down the speed at which the graph is drawn, it also manipulates the speed at which you can manipulate the variables. If you want to pause the simulation (ie. framerate 0) the program is then dead.
you can view the code & program over at openprocessing, I can't post the code here because it exceeds the max. char. count.
So basically this code is meant to draw a vertical and horizontal line and when they intersect draw a diagonal like off of that.
It's nothing fancy, I'm just trying to learn processing and figured it would be a nice little thing to try out.
I have the vertical and horizontal lines working, and the if statement recognizes the collision (but only if I set x1 and y1 to a constant instead of a random).
so...
1) what do I have to do to lines 14 & 17 to get them to recognize in the collision?
2) what do I have to do to get my diagonal line to grow from that collision point?