Wednesday, March 17, 2010

GUI for Processing

In response to Francesca's post here is a little sample of a GUI that can control x parameters by simply feeding the value of the sliders into whatever you need to change. Thanks Anton for integrating Zoog with Handles:-)
For now only the first two slides do something (change the size of the head) but you can download the source, open it in Processing and assign the other sliders to change color, position or whatever you want in your project. For example in the code:
ellipse(300,70, handles[0].length * 2, handles[1].length *2); handles[0] (the first handle) changes the size of the head in the X dimension and handles[1] in the Y
The reason it is multiplied by 2 is simply to extend the range since in the original code the handles are only giving values from 0 to 89 which was too small a change for the head. Experiment with that. Enjoy
































This browser does not have a Java Plug-in.



Get the latest Java Plug-in here.









Source code: Handles_Control

No comments: