小立方体组合的三视图【输入框法】
2020-04-27 11:24
本范例演示了如何通过输入框和按钮自由摆放小立方体,并实时生成其组合体的三视图(主视图、左视图、俯视图)。利用向量、序列和Zip命令实现立方体的平移与阵列分布,结合文本输入框动态控制各层立方体的数量与位置,帮助学生直观理解立体几何中三视图的投影原理与空间想象能力。
所属专题
立体几何
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.579.0" app="classic" platform="d" id="8b34040f-5f58-4082-8848-be9e6a83d219" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/apps/xsd/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="930" height="727" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.821505376344086" orientation="1" />
<pane location="0" divider="0.34946236559139787" orientation="1" />
</panes>
<views>
<view id="1" visible="true" inframe="false" stylebar="true" location="3,3" size="325" window="100,100,600,400" />
<view id="4" toolbar="0 || 2020 , 2021 , 2022 , 66 || 2001 , 2003 , 2002 , 2004 , 2005 || 2040 , 2041 , 2042 , 2044 , 2043" visible="false" inframe="false" stylebar="true" location="1,1" size="300" window="100,100,600,400" />
<view id="8" toolbar="1001 | 1002 | 1003 || 1005 | 1004 || 1006 | 1007 | 1010 || 1008 1009 || 66 68 || 6" visible="false" inframe="false" stylebar="false" location="1,3" size="300" window="100,100,600,400" />
<view id="512" toolbar="0 | 1 501 5 19 , 67 | 2 15 45 18 , 7 37 | 514 3 9 , 13 44 , 47 | 16 51 | 551 550 11 , 20 22 21 23 , 55 56 57 , 12 | 69 | 510 511 , 512 513 | 533 531 , 534 532 , 522 523 , 537 536 , 535 | 521 520 | 36 , 38 49 560 | 571 30 29 570 31 33 | 17 | 540 40 41 42 , 27 28 35 , 6 , 502" visible="true" inframe="false" stylebar="true" location="3,1" size="434" window="100,100,600,400" />
<view id="2" visible="false" inframe="false" stylebar="true" location="3" size="163" window="100,100,600,400" />
<view id="16" visible="true" inframe="false" stylebar="true" location="1" size="145" window="50,50,500,500" />
<view id="32" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="64" toolbar="0" visible="false" inframe="false" stylebar="false" location="1" size="150" window="50,50,500,500" />
<view id="4097" visible="false" inframe="true" stylebar="true" location="1" size="370" window="273,77,700,550" />
<view id="70" toolbar="0 || 2020 || 2021 || 2022" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />
</views>
<toolbar show="true" items="0 39 73 62 | 1 501 67 , 5 19 , 72 75 76 | 2 15 45 , 18 65 , 7 37 | 4 3 8 9 , 13 44 , 58 , 47 | 16 51 64 , 70 | 10 34 53 11 , 24 20 22 , 21 23 | 55 56 57 , 12 | 36 46 , 38 49 50 , 71 14 68 | 30 29 54 32 31 33 | 25 17 26 60 52 61 | 40 41 42 , 27 28 35 , 6" position="1" help="false" />
<input show="true" cmd="true" top="algebra" />
<dockBar show="false" east="true" />
</perspective>
</perspectives>
<labelingStyle val="3"/>
<font size="14"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="325" height="528"/>
<coordSystem xZero="-28.999999999999922" yZero="368.4999999999999" scale="49.99999999999997" yscale="50.000000000000014"/>
<evSettings axes="false" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="3"/>
<bgColor r="255" g="255" b="255"/>
<axesColor r="0" g="0" b="0"/>
<gridColor r="192" g="192" b="192"/>
<lineStyle axes="1" grid="0"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<euclidianView>
<viewNumber viewNo="2"/>
<size width="145" height="528"/>
<coordSystem xZero="215.00000000000003" yZero="315.00000000000006" scale="50.00000000000001" yscale="50.00000000000001"/>
<evSettings axes="false" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="3"/>
<bgColor r="255" g="255" b="255"/>
<axesColor r="0" g="0" b="0"/>
<gridColor r="192" g="192" b="192"/>
<lineStyle axes="1" grid="0"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<kernel>
<uses3D val="true"/>
<continuous val="false"/>
<usePathAndRegionParameters val="true"/>
<decimals val="2"/>
<angleUnit val="degree"/>
<algebraStyle val="2" spreadsheet="0"/>
<coordStyle val="0"/>
</kernel>
<tableview min="-2.0" max="2.0" step="1.0"/>
<scripting blocked="false" disabled="false"/>
<euclidianView3D>
<coordSystem xZero="-1.0" yZero="-0.0" zZero="-1.0" scale="50.0" xAngle="20.0" zAngle="-60.0"/>
<evSettings axes="false" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" gridType="3"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="2" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<plate show="false"/>
<bgColor r="255" g="255" b="255"/>
<clipping use="false" show="false" size="1"/>
<projection type="0"/>
</euclidianView3D>
<construction title="" author="" date="">
<command name="Vector">
<input a0="(1, 0, 0)"/>
<output a0="u"/>
</command>
<element type="vector3d" label="u">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="1.0" y="0.0" z="0.0" w="0.0"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
</element>
<command name="Vector">
<input a0="(0, 1, 0)"/>
<output a0="v"/>
</command>
<element type="vector3d" label="v">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="0.0" y="1.0" z="0.0" w="0.0"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
</element>
<command name="Vector">
<input a0="(0, 0, 1)"/>
<output a0="w"/>
</command>
<element type="vector3d" label="w">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="0.0" y="0.0" z="1.0" w="0.0"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
</element>
<expression label="l1" exp="{}"/>
<element type="list" label="l1">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="0" playing="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<listType val="point3d"/>
<pointSize val="5"/>
<angleStyle val="0"/>
</element>
<element type="point3d" label="A">
<show object="false" label="true" ev="4"/>
<objColor r="77" g="77" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="0.0" y="0.0" z="0.0" w="1.0"/>
<pointSize val="5"/>
</element>
<command name="Textfield">
<input a0="A"/>
<output a0="InputBox1"/>
</command>
<element type="textfield" label="InputBox1">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="18" y="74"/>
<labelMode val="3"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript onUpdate="SetValue[l1,Append[l1,A]]"/>
<font serif="false" sizeM="1.4" size="6" style="0"/>
<length val="6"/>
<caption val="请输入立方体的点1:"/>
</element>
<command name="Zip">
<input a0="Cube[P, P + (1, 0, 0), Point[Circle[P + (1, 0, 0), Distance[P, P + (1, 0, 0)], Segment[P, P + (1, 0, 0)]]]]" a1="P" a2="l1"/>
<output a0="l2"/>
</command>
<element type="list" label="l2">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="153" b="204" alpha="0.8999999761581421"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<listType val="polyhedron"/>
<pointSize val="5"/>
<angleStyle val="0"/>
</element>
<element type="button" label="button1">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="119" y="443"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="l1={}
SetValue[a,0]
SetValue[b,0]
SetValue[h,0]"/>
<font serif="false" sizeM="2.0" size="14" style="0"/>
<caption val="初始化"/>
</element>
<element type="numeric" label="a">
<value val="0.0"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="-5" max="5" absoluteScreenLocation="true" width="200.0" x="30.0" y="50.0" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<animation speed="1" type="3" playing="false"/>
</element>
<element type="numeric" label="b">
<value val="0.0"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="-2" max="5" absoluteScreenLocation="true" width="200.0" x="30.0" y="50.0" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<animation speed="1" type="3" playing="false"/>
</element>
<element type="numeric" label="h">
<value val="0.0"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="-2" max="2" absoluteScreenLocation="true" width="200.0" x="30.0" y="50.0" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<animation speed="1" type="3" playing="false"/>
</element>
<element type="point3d" label="B">
<show object="false" label="true" ev="4"/>
<objColor r="77" g="77" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="0.0" y="0.0" z="0.0" w="1.0"/>
<pointSize val="5"/>
</element>
<command name="Textfield">
<input a0="B"/>
<output a0="InputBox2"/>
</command>
<element type="textfield" label="InputBox2">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="192" b="203" alpha="255"/>
<layer val="0"/>
<labelOffset x="20" y="170"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<font serif="false" sizeM="1.4" size="6" style="0"/>
<length val="6"/>
<caption val="以立方体的点1开始:"/>
</element>
<command name="Textfield">
<input a0="a"/>
<output a0="InputBox3"/>
</command>
<element type="textfield" label="InputBox3">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="192" b="203" alpha="255"/>
<layer val="0"/>
<labelOffset x="20" y="220"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<font serif="false" sizeM="1.4" size="6" style="0"/>
<length val="3"/>
<caption val="向右摆放立方体的个数为:"/>
</element>
<command name="Textfield">
<input a0="b"/>
<output a0="InputBox4"/>
</command>
<element type="textfield" label="InputBox4">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="192" b="203" alpha="255"/>
<layer val="0"/>
<labelOffset x="20" y="270"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<font serif="false" sizeM="1.4" size="6" style="0"/>
<length val="3"/>
<caption val="向后摆放立方体的个数为:"/>
</element>
<command name="Textfield">
<input a0="h"/>
<output a0="InputBox5"/>
</command>
<element type="textfield" label="InputBox5">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="192" b="203" alpha="255"/>
<layer val="0"/>
<labelOffset x="20" y="320"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<font serif="false" sizeM="1.4" size="6" style="0"/>
<length val="3"/>
<caption val="向上摆放立方体的个数为:"/>
</element>
<element type="button" label="button2">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="20" y="383"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="SetViewDirection( Vector[(0,1,0)])"/>
<font serif="false" sizeM="2.0" size="14" style="0"/>
<caption val="主视图"/>
</element>
<element type="button" label="button3">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="120" y="383"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="SetViewDirection( Vector[(1,0,0)])"/>
<font serif="false" sizeM="2.0" size="14" style="0"/>
<caption val="左视图"/>
</element>
<element type="button" label="button4">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="220" y="383"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="SetViewDirection( Vector[(0,0,0-1)])"/>
<font serif="false" sizeM="2.0" size="14" style="0"/>
<caption val="俯视图"/>
</element>
<element type="button" label="button5">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<layer val="0"/>
<labelOffset x="22" y="443"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="SetViewDirection( )"/>
<font serif="false" sizeM="2.0" size="14" style="0"/>
<caption val="复位"/>
</element>
<command name="Sequence">
<input a0="Translate[Cube[B, B + (1, 0, 0), Point[Circle[B + (1, 0, 0), Distance[B, B + (1, 0, 0)], Segment[B, B + (1, 0, 0)]]]], Vector[(k * u)]]" a1="k" a2="If[a < 0, a + 1, 0]" a3="If[a < 0, 0, a - 1]"/>
<output a0="l3"/>
</command>
<element type="list" label="l3">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="153" b="204" alpha="0.8999999761581421"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<listType val="polyhedron"/>
<pointSize val="5"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Translate[Cube[B, B + (1, 0, 0), Point[Circle[B + (1, 0, 0), Distance[B, B + (1, 0, 0)], Segment[B, B + (1, 0, 0)]]]], Vector[(k * v)]]" a1="k" a2="If[b < 0, b, 1]" a3="If[b < 0, 0, b]"/>
<output a0="l4"/>
</command>
<element type="list" label="l4">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="153" b="204" alpha="0.8999999761581421"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<listType val="polyhedron"/>
<pointSize val="5"/>
<angleStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Translate[Cube[B, B + (1, 0, 0), Point[Circle[B + (1, 0, 0), Distance[B, B + (1, 0, 0)], Segment[B, B + (1, 0, 0)]]]], Vector[(k * w)]]" a1="k" a2="If[h < 0, h, 1]" a3="If[h < 0, 0, h]"/>
<output a0="l5"/>
</command>
<element type="list" label="l5">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="153" b="204" alpha="0.8999999761581421"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<listType val="polyhedron"/>
<pointSize val="5"/>
<angleStyle val="0"/>
</element>
<element type="point" label="C">
<show object="false" label="true" ev="11"/>
<objColor r="77" g="77" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="-4.476" y="-3.164" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="point" label="D">
<show object="false" label="true" ev="11"/>
<objColor r="77" g="77" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="-1.2736" y="-3.164" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="image" label="pic1">
<file name="a94857e5933a1326ec9a95938feb52d3/公众号 二维码.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="C"/>
<startPoint number="1" exp="D"/>
<show object="true" label="false" ev="3"/>
<objColor r="0" g="0" b="0" alpha="1.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<expression label="text1" exp=""制作教程:""/>
<element type="text" label="text1">
<show object="true" label="false" ev="43"/>
<objColor r="0" g="0" b="0" alpha="0.0"/>
<bgColor r="255" g="192" b="203" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<font serif="true" sizeM="2.0" size="14" style="0"/>
<startPoint x="-4.3" y="4.94" z="1.0"/>
</element>
<element type="point" label="E">
<show object="false" label="true" ev="11"/>
<objColor r="77" g="77" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="-4.276" y="1.256" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="point" label="F">
<show object="false" label="true" ev="11"/>
<objColor r="77" g="77" b="255" alpha="0.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="-1.4736" y="1.256" z="1.0"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="image" label="pic2">
<file name="3008dc4a74644f128103a02159545656/1587985480.png"/>
<inBackground val="false"/>
<startPoint number="0" exp="E"/>
<startPoint number="1" exp="F"/>
<show object="true" label="false" ev="3"/>
<objColor r="0" g="0" b="0" alpha="1.0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
</construction>
</geogebra>