I've been trying to draw ellipses with strokes with GLGraphics as my main renderer. However, for some reason the stroke ends up having a weird jagged texture that doesn't happen when I other renderers. I tried using PGraphics and rendering the ellipse's stroke using P2D, but it just doesn't show up at all. Does anyone know how to fix this? It also becomes transparent for some reason...
I have also attached an image of the problem in a quick test window (might need to view full size of image to see the problem).
Imgur Link
I have been trying to get my sketch working in Javascript mode, but all I am getting is a blank screen without any error message. I have tried creating quick and simple sketches in Javascript mode and they seem to work fine, but I have no idea why my sketch is not working at all. Could someone take a look and let me know what needs to be changed?
Thanks!
(PS, Sorry if it's really messy. I haven't really had much programming experience and the code was also originally written with some libraries like SimpleOpenNI, Ani, and PeasyCam, although they've been removed in this version).
I was trying to use the Z position of a hand to emulate a button press. So far when I try it using one hand it works really well, however, when I try to get it to work with a second hand, only one of the hands work. (I know it can be more efficient by moving everything except the fill out of the if statements, but I kept those in there just in case I want to change the sizes or something.)
irz and ilz are the initial Z positions of the hands when they are first recognized by onCreateHands and rz and lz are the current Z positions. As of now, the code works fine with one hand, but the other hand will either stay pressed or unpressed. If i comment one of the sections out, it works fine as well.
if (rz - irz > 0) {
pushStyle();
fill(60);
ellipse(rx, ry, 10, 10);
popStyle();
rpressed = true;
}
else {
pushStyle();
noFill();
ellipse(rx, ry, 10, 10);
popStyle();
rpressed = false;
}
if (lz - ilz > 0) {
pushStyle();
fill(60);
ellipse(lx, ly, 10, 10);
popStyle();
lpressed = true;
}
else {
pushStyle();
noFill();
ellipse(lx, ly, 10, 10);
popStyle();
lpressed = false;
}
I tried outputting the values of rz - irz and lz - ilz and the numbers range from small negative values to small positive values (around -8 to 8) for lz - ilz. But rz - irz outputs numbers from around 8-30 depending on each time I run it and is never consistent. Also, when I comment out the code for the lz-ilz, the values for rz-irz look just fine and it operates as intended. Is there a reason tracking both Z positions throws off one hand? And is there a way to get it to work?