My textured shape has a crease along the hypotenuse of my quad. How do i prevent this?
in
Core Library Questions
•
1 year ago
I am drawing trapezoidal parts of a shape and while the the top and bottom seem so have no problems, the sides seem to be constructed from triangles and not quads. Btw, this was based on the 'textured cube" example.
EDIT: Added Screen Shot.
This screen shot is from 2.06a on Windows 7.
EDIT: Added Screen Shot.
This screen shot is from 2.06a on Windows 7.
- beginShape(QUADS);
texture(tex);
//top
vertex(-2, 2, -4, 0, 0);
vertex( 2, 2, -4, 1, 0);
vertex( 4, 4, 0, 1, 1);
vertex(-4, 4, 0, 0, 1);
// mid
vertex(-2, -2, -4, 0, 0);
vertex( 2, -2, -4, 1, 0);
vertex( 2, 2, -4, 1, 1);
vertex(-2, 2, -4, 0, 1);
//bott.
vertex(-4, -4, 0, 0, 0);
vertex( 4, -4, 0, 1, 0);
vertex( 2, -2, -4, 1, 1);
vertex(-2, -2, -4, 0, 1);
// left -- HAS A CREASE FROM CORNER TO CORNER
vertex(-4, -4, 0, 0, 0);
vertex(-2, -2, -4, 1, 0);
vertex(-2, 2, -4, 1, 1);
vertex(-4, 4, 0, 0, 1);
// right -- HAS A CREASE FROM CORNER TO CORNER
vertex( 2, -2, -4, 0, 0);
vertex( 4, -4, 0, 1, 0);
vertex( 4, 4, 0, 1, 1);
vertex( 2, 2, -4, 0, 1);
endShape();
I can post the rest of the program if anyone thinks its necessary or easier to debug ( I am trying to recreate David Ope's black and white GIFs.)
1