Skip to content

Instantly share code, notes, and snippets.

@jeonghopark
Last active December 21, 2016 11:34
Show Gist options
  • Select an option

  • Save jeonghopark/e37835b40194ab2015d6f03e3ccdb466 to your computer and use it in GitHub Desktop.

Select an option

Save jeonghopark/e37835b40194ab2015d6f03e3ccdb466 to your computer and use it in GitHub Desktop.
ArrayList<PVector> meshPos = new ArrayList();
void setup() {
size(800, 500, P3D);
for (int i=0; i<20; i++) {
meshPos.add(new PVector( i * 10, 0, 0) );
}
}
void draw() {
background(120);
beginShape(TRIANGLE_STRIP);
for (int i=0; i<meshPos.size(); i++) {
vertex(meshPos.get(i).x, meshPos.get(i).y, meshPos.get(i).z);
vertex(meshPos.get(i).x, meshPos.get(i).y + 20, meshPos.get(i).z);
}
endShape(CLOSE);
}
@jeonghopark
Copy link
Author

jeonghopark commented Dec 21, 2016

screen shot 2016-12-21 at 12 03 23

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