float x1,y1,x2,y2; float x3,y3; size(300,300); x1=100; y1=200; x2=250; y2=300; line(x1,y1, x2,y2); line(0,0, x1,y1); line(0,0, x2,y2); rectMode(CENTER_DIAMETER); rect(x1,y1, 20,20); rect(x2,y2, 20,20);