stroke alpha < 255 causing curious behavior
in
Programming Questions
•
1 year ago
The following sketch draws a series of points. When I change the alpha value for stroke() to anything less than 255 [line 11], the points draw on only the left ~1/3 of the sketch. I do not understand how changing the alpha could cause this to happen. I have tested this in 1.2.1 and 1.5.1 with the same results.
- float a = -0.966918;
- float b = 2.879879;
- float c = 0.765145;
- float d = 0.744728;
- float x = 0.1;
- float y = 0.1;
- void setup() {
- size(400, 400);
- background(255);
- stroke(0,255); // this is the line in question
- }
- void draw() {
- translate(200, 200);
- float xNew = sin(y*b) + c * (sin(x*b));
- float yNew = sin(x*a) + d * (sin(y*a));
- x = xNew; y = yNew;
- point(x*100, y*100);
- }
1