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

line loops incorrectly closed in P3D #4031

Closed
codeanticode opened this Issue Oct 19, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@codeanticode
Member

codeanticode commented Oct 19, 2015

With this code:

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

void draw() {
  background(255);
  noFill();
  stroke(0, 180);
  strokeWeight(10);
  for (int gridY=0; gridY<width; gridY+=100) {
    for (int gridX=0; gridX<height; gridX+=100) {
      float diameter = dist(mouseX, mouseY, gridX, gridY);
      diameter = diameter/500 * 80;
      pushMatrix();
      translate(gridX, gridY, diameter*5);
      beginShape(LINE_LOOP);
      for (float a = 0; a < TWO_PI; a += 0.5) {
       vertex(cos(a) * diameter, sin(a) * diameter);  
      }
      endShape();      
      popMatrix(); 
    }
  }
}

Notice the overlapping triangles in the right end of the loops:

image

Tested in Processing 3.0

@codeanticode codeanticode added the opengl label Oct 19, 2015

@codeanticode codeanticode self-assigned this Oct 19, 2015

@codeanticode

This comment has been minimized.

Show comment
Hide comment
@codeanticode

codeanticode Oct 19, 2015

Member

fixed with 1145839

Member

codeanticode commented Oct 19, 2015

fixed with 1145839

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