I cannot make an array with locations for the vectors without using a for loop. Because of the rest of the code I need to draw all the vectors (calculates apparently of the canvas size). Is it possible to set some 'null' (how?)?
We would like to know how we can call a function within the draw loop which is activated by a Photo Interrupter sensor (high/low). The function is some sort of animation which is build from moving vertexes. When activated this function has to last for about 10 seconds. When the timer has finished the function should be called again.
While activating the sensor, the function loops only for 1 frame ( < 1 sec.). How do I solve this? When there are any questions, please ask. Thanks for your help!
// read the sensor input pin:
buttonState = arduino.digitalRead(digitalPin);
// compare the buttonState to its previous state
if (buttonState != lastButtonState) {
// if the state has changed, increment the counter
I would like to make an image (rectangle, 170x110px just like a business card) that transforms smoothly into a triangle while it's moving along vectorField. Color should change as well. It should look like a shape tween in Flash.