I’m trying to recreate a code that ran well in Processing 3
When the shape is not a plane but has different z values for some vertexes - it fills the shape very strangely.
Any ideas how to avoid this?
This is how it looks flat
This is how it looks when it has a "wave"
This is what it’s supposed to look like (ie my original Processing sketch)
Link to the sketch
https://editor.p5js.org/atommic/sketches/kqblWtqln
Edit:
I’ve played with the material and it seems like it connects all the vertexes to the first vertex in the arrray for some reason (P5JS screenshot)
Any idea why this is happening and how to avoid it?