+
試算下列四角柱的表面積。
+
+ init( { range : [ [ -10, 10 ], [ -9, -7 + E + B / 2 + 2 ] ], scale : 20 } );
+ path( [ [ -5, -7 ], [ -5, -7 + E ], [ -5 + A, -7 + E ], [ -5 + A, -7 ], [ -5, -7 ] ], { fill : "#A6FFA6", opacity : 0.9 } );
+ path( [ [ -5, -7 + E ], [ -5 + A / 2 - C / 2, -7 + E + B / 2 ], [ -5 + A / 2 + C / 2, -7 + E + B / 2 ], [ -5 + A, -7 + E ], [ -5 , -7 + E ] ], { fill : "#A6FFA6" } );
+ if( A < C ) {
+ path( [ [ -5, -7 ], [ -5, -7 + E ], [ -5 + A / 2 - C / 2, -7 + E + B / 2 ], [ -5 + A / 2 - C / 2, -7 + B / 2 ], [ -5, -7 ] ], { fill : "#A6FFA6", opacity : 0.75 } );
+ path( [ [ -5 + A, -7 ], [ -5 + A, -7 + E ], [ -5 + A / 2 + C / 2, -7 + E + B / 2 ], [ -5 + A / 2 + C / 2, -7 + B / 2 ], [ -5 + A, -7 ] ], { fill : "#A6FFA6", opacity : 0.75 } );
+ }
+ line( [ -5 + A / 2, -7 + E ], [ -5 + A / 2, -7 + E + B / 2 ], { "stroke-dasharray" : "-", stroke : "orange" } );
+ label( [ -5 + A / 2 + 0.6, -7 + E + B / 4 ], B, { color : "orange" } );
+ line( [ -5, -7 + E ], [ -5 + A, -7 + E ], { stroke : "blue" } );
+ label( [ -5 + A / 2, -7 + E - 0.8 ], A, { color : "blue" } );
+ line( [ -5 + A, -7 + E ], [ -5 + A, -7 ], { stroke : "green" } );
+ label( [ -5 + A + 0.5, -7 + E / 2 ], E, { color : "green" } );
+ line( [ -5 + A / 2 - C / 2, -7 + E + B / 2 ], [ -5 + A / 2 + C / 2, -7 + E + B / 2 ], { stroke : "purple" } );
+ label( [ -5 + A / 2, -7 + E + B / 2 + 0.6 ], C, { color : "purple" } );
+ line( [ -5, -7 + E ], [ -5 + A / 2 - C / 2, -7 + E + B / 2 ], { stroke : "red" } );
+ label( [ -5 + A / 4 - C / 4, -7 + E + B / 4 ], D, A > C ? "above left" : "below left", { color : "red" } );
+ line( [ -5 + A / 2 + C / 2, -7 + E + B / 2 ], [ -5 + A, -7 + E ], { stroke : "red" } );
+ label( [ -5 + 3 * A / 4 + C / 4, -7 + E + B / 4 ], D, A > C ? "above right" : "below right", { color : "red" } );
+
+
+