class Plug { float t=1, x=0, y=0, XT, YT; Plug (float posx, float posy,float taille, float xt, float yt) { x=posx; y=posy; t=taille; XT=xt; YT=yt; } void Dessiner() { fill(200); strokeWeight(1); pushMatrix(); translate(x,y); beginShape(); vertex (8*t,0); vertex (12*t,0); vertex (12*t,-2*t); bezierVertex (12*t,-3*t,12*t,-3*t,8*t,-3*t); vertex (4*t,-3*t); bezierVertex (0,-3*t,0,-3*t,0,-2*t); vertex (0,0); vertex (4*t,0); endShape(); noFill(); strokeWeight(4); bezier(6*t, -3*t, 6*t, -100*t, (XT)+20-x, (YT)-y, XT-x, YT-y); strokeWeight(1); popMatrix(); } }