New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stroke glitches #4007

Closed
JakubValtar opened this Issue Oct 16, 2015 · 8 comments

Comments

Projects
None yet
2 participants
@JakubValtar
Contributor

JakubValtar commented Oct 16, 2015

I noticed on multiple occasions that stroke creates strange glitches when drawing larger number of primitives:

Java2D

grid

size(600, 600);

translate(341, 297);
scale(0.952381);
rotate(0.40000004);

background(0);
stroke(128);
for (int x = -50; x < 50; x++) {
  line(20 * x, -1000, 20 * x, 1000);  
}
for (int y = -50; y < 50; y++) {
  line(-1000, 20 * y, 1000, 20 * y);  
}
// Edit: I removed functions drawing the ellipse and center lines, they are not important

P3D

gl1

// modified example from Generative Design P_2_1_2_03
void setup(){
  size(600, 600, P3D);
}

void draw() {
  background(255);
  noFill();
  stroke(0, 180);
  strokeWeight(10);
  for (int gridY=0; gridY<width; gridY+=50) {
    for (int gridX=0; gridX<height; gridX+=50) {
      float diameter = dist(mouseX, mouseY, gridX, gridY);
      diameter = diameter/500 * 80;
      pushMatrix();
      translate(gridX, gridY, diameter*5);
      ellipse(0, 0, diameter, diameter);
      popMatrix(); 
    }
  }
}

Probably caused by the same bug:

gl2

void setup(){
  size(600, 600, P3D);
}

void draw() {
  background(255);
  noFill();
  stroke(0, 180);
  strokeWeight(100);
  ellipse(width/2, height/2, width*2/3, height*2/3);
}
@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Oct 18, 2015

Member

I think these are two separate issues, the origin of the stroke glitches is probably different for JAVA2D and P3D.

Member

codeanticode commented Oct 18, 2015

I think these are two separate issues, the origin of the stroke glitches is probably different for JAVA2D and P3D.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Oct 18, 2015

Contributor

Yes, I thought so too, but didn't have time to investigate further. Do you have some idea about P3D? You were fixing strokes recently.

Contributor

JakubValtar commented Oct 18, 2015

Yes, I thought so too, but didn't have time to investigate further. Do you have some idea about P3D? You were fixing strokes recently.

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Oct 18, 2015

Member

No, I need to look into it. I did some fixes that took care of glitches that appeared when you had very large stroke geometry, which does not seem to be the case. I wonder if I introduced a regression with those fixes.

Member

codeanticode commented Oct 18, 2015

No, I need to look into it. I did some fixes that took care of glitches that appeared when you had very large stroke geometry, which does not seem to be the case. I wonder if I introduced a regression with those fixes.

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Oct 19, 2015

Member

The JAVA2D portion of this issue is now reported in #4030, and the P3D glitches in #4027 and #4029

Member

codeanticode commented Oct 19, 2015

The JAVA2D portion of this issue is now reported in #4030, and the P3D glitches in #4027 and #4029

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Oct 19, 2015

Contributor

@codeanticode Thanks for cleaning this up. I guess that both P3D issues will be related, but let's see what we find.

Contributor

JakubValtar commented Oct 19, 2015

@codeanticode Thanks for cleaning this up. I guess that both P3D issues will be related, but let's see what we find.

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Oct 19, 2015

Member

The P3D issues with strokes should be fixed with ed76e73 and 1145839. If you have a chance, take a look to see if there is anything else behaving weirdly.

Member

codeanticode commented Oct 19, 2015

The P3D issues with strokes should be fixed with ed76e73 and 1145839. If you have a chance, take a look to see if there is anything else behaving weirdly.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Oct 19, 2015

Contributor

@codeanticode Oh wow, you are amazing. Will check it asap.

Contributor

JakubValtar commented Oct 19, 2015

@codeanticode Oh wow, you are amazing. Will check it asap.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar Oct 20, 2015

Contributor

@codeanticode Works like a charm!

Contributor

JakubValtar commented Oct 20, 2015

@codeanticode Works like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment