变换的桌面:多边形与向量平移几何演示
2019-07-25 09:59
本GeoGebra范例通过多边形(Polygon)和向量平移(Translate)命令,构建一个可变换的桌面模型。利用向量控制桌面及桌腿的平移变换,展示几何变换在构造复杂图形中的应用。范例包含桌面主体与多条桌腿(legA至legH)的构造,演示如何通过基础几何命令与向量运算实现整体图形的动态变换效果,适用于学习平移变换与向量几何。
所属专题
数学之美:GeoGebra互动数学资源集
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.550.0" app="classic" platform="w" id="08763CF8-2D2D-42E1-B2A3-F92A2F928191" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="1440" height="742" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.3236111111111111" orientation="1" />
</panes>
<views>
<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="false" inframe="false" stylebar="false" location="1,1,1" size="500" window="100,100,600,400" />
<view id="4" toolbar="0 || 2020 , 2021 , 2022 || 2001 , 2003 , 2002 , 2004 , 2005 || 2040 , 2041 , 2042 , 2044 , 2043" visible="false" inframe="false" stylebar="false" location="1,1" size="300" window="100,100,600,400" />
<view id="8" toolbar="1001 | 1002 | 1003 || 1005 | 1004 || 1006 | 1007 | 1010 || 1008 | 1009 || 6" visible="false" inframe="false" stylebar="false" location="1,3" size="300" window="100,100,600,400" />
<view id="4097" visible="false" inframe="false" stylebar="true" location="1,1" size="413" window="100,100,700,550" />
<view id="1" visible="true" inframe="false" stylebar="true" location="1" size="966" window="100,100,600,400" />
<view id="2" visible="true" inframe="false" stylebar="false" location="3" size="466" window="100,100,600,400" />
<view id="16" visible="false" inframe="false" stylebar="false" location="1" size="300" window="50,50,500,500" />
<view id="32" visible="false" inframe="false" stylebar="true" location="1" size="300" window="50,50,500,500" />
<view id="64" toolbar="0" visible="false" inframe="false" stylebar="false" location="1" size="480" window="50,50,500,500" />
<view id="128" visible="false" inframe="false" stylebar="false" location="1" size="480" window="50,50,500,500" />
<view id="70" toolbar="0 || 2020 || 2021 || 2022" visible="false" inframe="false" stylebar="true" location="1" size="900" window="50,50,500,500" />
<view id="43" visible="false" inframe="false" stylebar="false" location="1" size="450" window="50,50,500,500" />
</views>
<toolbar show="true" items="0 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="false" />
<dockBar show="false" east="false" />
</perspective>
</perspectives>
<labelingStyle val="0"/>
<font size="16"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="966" height="646"/>
<coordSystem xZero="315.55371900826446" yZero="347.7190082644628" scale="43.388429752066074" yscale="43.38842975206609"/>
<evSettings axes="false" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="0"/>
<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>
<algebraView>
<mode val="3"/>
</algebraView>
<kernel>
<continuous val="false"/>
<usePathAndRegionParameters val="true"/>
<decimals val="2"/>
<angleUnit val="degree"/>
<algebraStyle val="3" spreadsheet="0"/>
<coordStyle val="0"/>
</kernel>
<tableview min="-2" max="2" step="1"/>
<scripting blocked="false" disabled="false"/>
<construction title="变换的桌面" author="" date="">
<element type="numeric" label="w">
<value val="2"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="153" g="204" b="255" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="0" max="5" absoluteScreenLocation="true" width="200" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="2" type="0" typeHidden="1" opacity="127"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<element type="numeric" label="l">
<value val="4"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="0" max="5" absoluteScreenLocation="true" width="200" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<expression label="vd" exp="(4, 0)" type="vector"/>
<element type="vector" label="vd">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="0" playing="false"/>
<coords x="4" y="0" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<expression label="ang" exp="(5 / 12 * π)"/>
<element type="numeric" label="ang">
<value val="1.3089969389957472"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<animation speed="1" type="0" playing="false"/>
</element>
<expression label="A" exp="(0, 0)" type="point"/>
<element type="point" label="A">
<show object="false" label="true"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="1" playing="false"/>
<coords x="0" y="0" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<expression label="B" exp="(l; ang)" type="point" />
<element type="point" label="B">
<show object="false" label="true"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="1.035276180410083" y="3.8637033051562732" z="1"/>
<coordStyle style="polar"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<expression label="D" exp="((-w), 0)" type="point" />
<element type="point" label="D">
<show object="false" label="true"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-2" y="0" z="1"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<expression label="C" exp="B + D - A" type="point" />
<element type="point" label="C">
<show object="false" label="true"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-0.964723819589917" y="3.8637033051562732" z="1"/>
<coordStyle style="polar"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<command name="Polygon">
<input a0="A" a1="B" a2="C" a3="D"/>
<output a0="piL" a1="a" a2="b" a3="c" a4="d"/>
</command>
<element type="polygon" label="piL">
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<show object="true" label="false"/>
<objColor r="153" g="204" b="255" alpha="0.22"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<element type="segment" label="a">
<show object="true" label="false"/>
<objColor r="153" g="204" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="-3.8637033051562732" y="1.035276180410083" z="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="b">
<show object="true" label="false"/>
<objColor r="153" g="204" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="0" y="-2" z="7.7274066103125465"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="c">
<show object="true" label="false"/>
<objColor r="153" g="204" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="3.8637033051562732" y="-1.035276180410083" z="7.7274066103125465"/>
<lineStyle thickness="2" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="d">
<show object="true" label="false"/>
<objColor r="153" g="204" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="0" y="2" z="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Translate">
<input a0="Polygon[Rotate[A, (-ang)], Rotate[B, (-ang)], Rotate[C, (-ang)], Rotate[D, (-ang)]]" a1="vd"/>
<output a0="piR"/>
</command>
<element type="polygon" label="piR">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="153" g="204" b="255" alpha="0.5"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<element type="numeric" label="t1">
<value val="0"/>
<symbolic val="true" />
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="0" max="1" absoluteScreenLocation="true" width="200" x="30" y="50" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="0.02" speed="2" type="3" playing="false"/>
</element>
<element type="numeric" label="t2">
<value val="0"/>
<symbolic val="true" />
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="0" max="1" absoluteScreenLocation="true" width="200" x="36" y="95" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="0.02" speed="2" type="3" playing="false"/>
</element>
<command name="Translate">
<input a0="Polygon[Rotate[A, ((-ang) * t1)], Rotate[B, ((-ang) * t1)], Rotate[C, ((-ang) * t1)], Rotate[D, ((-ang) * t1)]]" a1="Vector[(vd * t2)]"/>
<output a0="piRt"/>
</command>
<element type="polygon" label="piRt">
<lineStyle thickness="2" type="0" typeHidden="1" opacity="127"/>
<show object="true" label="false"/>
<objColor r="255" g="153" b="0" alpha="0.78"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<element type="numeric" label="lw">
<value val="0.2"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="0" max="1" absoluteScreenLocation="true" width="200" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<animation step="0.1" speed="1" type="0" playing="false"/>
</element>
<element type="numeric" label="ll">
<value val="1"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="0" max="1" absoluteScreenLocation="true" width="200" x="30" y="50" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="0.1" speed="1" type="0" playing="false"/>
</element>
<command name="Polygon">
<input a0="A" a1="A + (0, (-ll))" a2="A + ((-lw), (-ll))" a3="A + ((-lw), 0)"/>
<output a0="legA" a1="a_1" a2="f" a3="g" a4="h"/>
</command>
<element type="polygon" label="legA">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0.1"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<element type="segment" label="a_1">
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0"/>
<layer val="0"/>
<labelOffset x="-21" y="6"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="1" y="0" z="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="f">
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0"/>
<layer val="0"/>
<labelOffset x="23" y="3"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="0" y="-0.2" z="-0.2"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="g">
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="-1" y="0" z="-0.2"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="h">
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0"/>
<layer val="0"/>
<labelOffset x="27" y="7"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<coords x="0" y="0.2" z="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Vector">
<input a0="A" a1="B"/>
<output a0="vhl"/>
</command>
<element type="vector" label="vhl">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="1.035276180410083" y="3.8637033051562732" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
<startPoint exp="A"/>
</element>
<command name="Translate">
<input a0="legA" a1="vhl"/>
<output a0="legB"/>
</command>
<element type="polygon" label="legB">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0.1"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<command name="Vector">
<input a0="(lw - w, 0)"/>
<output a0="vwl"/>
</command>
<element type="vector" label="vwl">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-1.8" y="0" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(l - lw, 0)"/>
<output a0="vwr"/>
</command>
<element type="vector" label="vwr">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3.8" y="0" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Translate">
<input a0="legA" a1="vwl"/>
<output a0="legC"/>
</command>
<element type="polygon" label="legC">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0.1"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<command name="Translate">
<input a0="legB" a1="vwl"/>
<output a0="legD"/>
</command>
<element type="polygon" label="legD">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0.1"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<command name="Translate">
<input a0="legA" a1="Vector[vd + Vector[(lw, 0)]]"/>
<output a0="legE"/>
</command>
<element type="polygon" label="legE">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0.1"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<command name="Translate">
<input a0="legE" a1="vwr"/>
<output a0="legF"/>
</command>
<element type="polygon" label="legF">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0.1"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<expression label="vhr" exp="(w; π - ang)" type="vector" />
<element type="vector" label="vhr">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-0.5176380902050413" y="1.9318516525781366" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="polar"/>
</element>
<command name="Translate">
<input a0="legE" a1="vhr"/>
<output a0="legH"/>
</command>
<element type="polygon" label="legH">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0.1"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<command name="Translate">
<input a0="legF" a1="vhr"/>
<output a0="legG"/>
</command>
<element type="polygon" label="legG">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false"/>
<objColor r="32" g="32" b="32" alpha="0.1"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
</construction>
</geogebra>