@Alhugen
As for the second questiont; try code below.
It is a tricky solution because mouseDragged() is far less fluent then I expected; so I had to build-in a small timer. Put the code right below background()
fill(0);
if (mouse_drag) delta_degree = int(first_degree-degree);
if (!mouse_drag) lock = false;
mouse_drag = false;
text("delta_degree = "+delta_degree, 150, 200);
text("degree = "+int(degree), 150, 100);
And,
void mouseDragged() {
if (!lock && millis()-start_time > 150) {
first_degree = degree;
lock = true;
}
mouse_drag = true;
start_time = millis();
}
/*
And of course declare variables
boolean mouse_drag, lock;
float start_time, first_degree;
int delta_degree;
*/
I have ideas about solving the other problems, but first I have to know if this is working for you.