class Iceberg { float xdrift; float x; float y; float iS; float tI; float s; Iceberg(float tempX, float tempY, float tempiS){ x=tempX; y=tempY; iS= tempiS; xdrift=5/iS; s = 25; } void drift (){ //xdrift = tempxdrift; x = x - xdrift; } void display () { fill(255,225, 255); noStroke(); beginShape(TRIANGLES); vertex(x, y); vertex(x +(3*iS), y-(4*iS)); vertex(x+ (5*iS), y ); endShape(CLOSE); beginShape(TRIANGLES); vertex(x+(2*iS), y); vertex(x +(5.5*iS), y-(7*iS)); vertex(x+ (10.5*iS), y); endShape(CLOSE); beginShape(TRIANGLES); vertex(x+(3*iS), y); vertex(x +(10.5*iS), y-(12*iS)); vertex(x+ (15.5*iS), y); endShape(CLOSE); } }