1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| size(300,300, P3D);
int a = 100;
int b = 30;
int c = 100;
int volume = a*b*c;
pushMatrix ();
translate(135, 150, 30);
rotateY(0.5);
rotateX(0);
noFill();
box(a, b, c);
textSize(10);
fill(250, 0, 0);
text("10Mètres", 10, 35);
stroke(250,0,0);
line(-30, 23, 100, 23);
textSize(13);
fill(5, 121, 11);
text("3Mètres", 109, 4);
stroke(1,121,11);
line(105, -22, 105, 22);
line(105, -22, 95, -12);
line(105, -22, 115, -12);
textSize(8);
fill(204, 85, 0);
text("10Mètres", -75, 28, -30);
stroke(204, 85, 0);
line(-61, 14, -37, 22);
popMatrix ();
print(volume = a*b*c);
textSize(12);
fill(0, 0, 255);
text("Volume = L x l x h", 15, 225, 0);
textSize(12);
fill(0, 0, 255);
text("Volume = 10 x 10 x 3", 15, 245, 0); |
Partager