Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup()
- {
- size(1600,900,P3D);
- }
- float zoff = 0;
- void draw()
- {
- strokeWeight(2);
- background(0);
- zoff -= 0.5f;
- noFill();
- translate(0,height/3);
- rotateX(PI/3);
- for(int z=0;z<50;z++)
- {
- stroke(lerpColor(color(255,100,255),color(255,0,255),(float)z/49.0));
- beginShape(TRIANGLE_STRIP);
- for(int x = 0;x<50 + 1;x++)
- {
- vertex(x * width/50,z * height/50,height/4.0 * noise((x) * 0.1, (z + zoff) * 0.1));
- vertex(x * width/50,(z + 1) * height/50,height/4.0 * noise((x) * 0.1, (z + 1 + zoff) * 0.1));
- }
- endShape();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement