Interactive Translation Transformation
2014-03-15 06:08
This GeoGebra example demonstrates geometric translation. By dragging the red control point, users interactively set the direction and magnitude of the translation vector, observing in real time how a polygon (e.g., triangle ABC) and its translated image (A'B'C') change position. Using the Translate command, it visually illustrates the core property that translation preserves shape and size, helpi
In collections
Secondary 1 Coordinate Geometry
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.309.0" id="42e33bba-cd01-4531-857c-63b096e0b469" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="960" height="660" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.61875" orientation="1" />
</panes>
<views>
<view id="4" toolbar="0 59 || 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="2" visible="false" inframe="false" stylebar="true" location="1,1" size="152" window="100,100,250,400" />
<view id="8" toolbar="1001 | 1002 | 1003 || 1005 | 1004 || 1006 | 1007 | 1010 | 1011 || 1008 1009 || 6" visible="false" inframe="false" stylebar="true" location="1,3" size="300" window="100,100,600,400" />
<view id="1" visible="true" inframe="false" stylebar="false" location="3" size="594" window="100,100,600,400" />
<view id="16" visible="true" inframe="false" stylebar="false" location="1" size="356" 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="true" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="128" visible="false" inframe="true" stylebar="false" location="1" size="480" window="50,50,500,500" />
<view id="4097" visible="false" inframe="true" stylebar="true" location="1" size="494" window="50,43,1230,753" />
<view id="70" toolbar="0 || 2020 || 2021 || 2022" visible="false" inframe="true" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="43" visible="false" inframe="false" stylebar="false" location="1" size="450" window="50,50,500,500" />
<view id="512" toolbar="0 | 1 501 5 19 , 67 | 2 15 45 18 , 7 37 | 514 3 9 , 13 44 , 47 | 16 | 551 550 11 , 22 , 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" size="300" window="50,50,500,500" />
</views>
<toolbar show="false" items="0 39 59 | 1 501 67 , 5 19 , 72 | 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 | 30 29 54 32 31 33 | 17 26 62 73 , 14 66 68 | 25 52 60 61 | 40 41 42 , 27 28 35 , 6" position="7" help="false" />
<input show="false" cmd="true" top="false" />
<dockBar show="false" east="false" />
</perspective>
</perspectives>
<labelingStyle val="0"/>
<font size="24"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="594" height="658"/>
<coordSystem xZero="297" yZero="338" scale="41.33787019880616" yscale="41.33785233125584"/>
<evSettings axes="true" grid="true" gridIsBold="true" pointCapturing="2" rightAngleStyle="1" checkboxSize="26" gridType="0"/>
<bgColor r="255" g="255" b="255"/>
<axesColor r="0" g="153" b="204"/>
<gridColor r="160" g="160" b="160"/>
<lineStyle axes="3" grid="0"/>
<axis id="0" show="true" label="x" unitLabel="" tickStyle="1" showNumbers="true" tickDistance="NaN" tickExpression=""/>
<axis id="1" show="true" label="y" unitLabel="" tickStyle="1" showNumbers="true" tickDistance="NaN" tickExpression=""/>
<grid distX="1" distY="1" distTheta="0.5235987755982988"/>
</euclidianView>
<euclidianView>
<viewNumber viewNo="2"/>
<size width="356" height="658"/>
<coordSystem xZero="212.63117273410293" yZero="420.3257974182094" scale="34.15067276825351" yscale="34.150672768253514"/>
<evSettings axes="false" grid="true" gridIsBold="true" pointCapturing="2" rightAngleStyle="1" checkboxSize="26" gridType="0"/>
<bgColor r="255" g="245" b="107"/>
<axesColor r="0" g="153" b="204"/>
<gridColor r="192" g="192" b="192"/>
<lineStyle axes="1" grid="0"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true" tickDistance="NaN" tickExpression=""/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true" tickDistance="NaN" tickExpression=""/>
<grid distX="1" distY="1" distTheta="0.5235987755982988"/>
</euclidianView>
<kernel>
<continuous val="false"/>
<usePathAndRegionParameters val="true"/>
<decimals val="2"/>
<angleUnit val="degree"/>
<algebraStyle val="0" spreadsheet="0"/>
<coordStyle val="0"/>
</kernel>
<scripting blocked="false" disabled="false"/>
<construction title="" author="" date="">
<element type="point" label="A">
<show object="true" label="true" ev="4"/>
<condition showObject="showPic"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelOffset x="-22" y="40"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="-4" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="1"/>
</element>
<element type="point" label="B">
<show object="true" label="true" ev="4"/>
<condition showObject="showPic"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelOffset x="-1" y="36"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="-1" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="1"/>
</element>
<element type="point" label="C">
<show object="true" label="true" ev="4"/>
<condition showObject="showPic"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="1" playing="false"/>
<coords x="-3" y="5" z="1"/>
<pointSize val="5"/>
<pointStyle val="1"/>
</element>
<command name="Polygon">
<input a0="A" a1="B" a2="C"/>
<output a0="poly1" a1="a_1" a2="b_1" a3="c"/>
</command>
<element type="polygon" label="poly1">
<lineStyle thickness="4" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<condition showObject="showPic"/>
<objColor r="0" g="255" b="255" alpha="0.3"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<element type="segment" label="a_1">
<show object="true" label="false" ev="4"/>
<condition showObject="showPic"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<coords x="0" y="3" z="-3"/>
<lineStyle thickness="4" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="b_1">
<show object="true" label="false" ev="4"/>
<condition showObject="showPic"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<coords x="-4" y="-2" z="-2"/>
<lineStyle thickness="4" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="c">
<show object="true" label="false" ev="4"/>
<condition showObject="showPic"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<coords x="4" y="-1" z="17"/>
<lineStyle thickness="4" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="point" label="U">
<show object="false" label="true" ev="3"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelOffset x="-25" y="-9"/>
<labelMode val="3"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<selectionAllowed val="false"/>
<coords x="-1" y="0" z="1"/>
<pointSize val="7"/>
<pointStyle val="1"/>
<caption val="起點"/>
</element>
<element type="point" label="V">
<show object="true" label="false" ev="11"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelOffset x="10" y="21"/>
<labelMode val="3"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="2" y="0" z="1"/>
<pointSize val="7"/>
<pointStyle val="1"/>
<caption val="終點"/>
</element>
<expression label="P" exp="(x(V), y(U))" type="point" />
<element type="point" label="P">
<show object="false" label="true"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<coords x="2" y="0" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Sequence">
<input a0="Vector[P + (sgn(y(V) - y(P)) * (0, i)), P + (sgn(y(V) - y(P)) * (0, i + 1))]" a1="i" a2="0" a3="abs(y(V) - y(P)) - 1"/>
<output a0="list2"/>
</command>
<element type="list" label="list2">
<show object="true" label="true" ev="11"/>
<objColor r="255" g="102" b="153" alpha="0"/>
<bgColor r="255" g="255" b="255" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="6" type="0" typeHidden="1"/>
<listType val="vector"/>
<pointSize val="3"/>
<pointStyle val="-1"/>
</element>
<command name="Sequence">
<input a0="Vector[U + (sgn(x(V) - x(U)) * (i, 0)), U + (sgn(x(V) - x(U)) * (i + 1, 0))]" a1="i" a2="0" a3="abs(x(V) - x(U)) - 1"/>
<output a0="list1"/>
</command>
<element type="list" label="list1">
<show object="true" label="true" ev="11"/>
<objColor r="255" g="102" b="153" alpha="0"/>
<bgColor r="255" g="255" b="255" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="6" type="0" typeHidden="1"/>
<pointSize val="3"/>
<pointStyle val="-1"/>
</element>
<command name="Translate">
<input a0="A" a1="Vector[U, V]"/>
<output a0="A'"/>
</command>
<element type="point" label="A'">
<show object="false" label="true"/>
<condition showObject="showPic ∧ showImage"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelOffset x="-22" y="39"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<coords x="-1" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="1"/>
</element>
<command name="Translate">
<input a0="B" a1="Vector[U, V]"/>
<output a0="B'"/>
</command>
<element type="point" label="B'">
<show object="true" label="true" ev="4"/>
<condition showObject="showPic ∧ showImage"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelOffset x="-4" y="37"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<coords x="2" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="1"/>
</element>
<command name="Translate">
<input a0="C" a1="Vector[U, V]"/>
<output a0="C'"/>
</command>
<element type="point" label="C'">
<show object="true" label="true" ev="4"/>
<condition showObject="showPic ∧ showImage"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<coords x="0" y="5" z="1"/>
<pointSize val="5"/>
<pointStyle val="1"/>
</element>
<command name="Polygon">
<input a0="A'" a1="B'" a2="C'"/>
<output a0="poly1'" a1="e" a2="f" a3="g"/>
</command>
<element type="polygon" label="poly1'">
<lineStyle thickness="4" type="0" typeHidden="1"/>
<show object="false" label="false" ev="4"/>
<condition showObject="showPic ∧ showImage"/>
<objColor r="0" g="255" b="255" alpha="0.3"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<element type="segment" label="e">
<show object="false" label="false" ev="4"/>
<condition showObject="showPic ∧ showImage"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<coords x="0" y="3" z="-3"/>
<lineStyle thickness="4" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="f">
<show object="false" label="false" ev="4"/>
<condition showObject="showPic ∧ showImage"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<coords x="-4" y="-2" z="10"/>
<lineStyle thickness="4" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="segment" label="g">
<show object="false" label="false" ev="4"/>
<condition showObject="showPic ∧ showImage"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<coords x="4" y="-1" z="5"/>
<lineStyle thickness="4" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="boolean" label="showImage">
<value val="false"/>
<show object="true" label="true" ev="3"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelOffset x="9" y="114"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<caption val="Show image"/>
</element>
<element type="boolean" label="showAxis">
<value val="true"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelOffset x="9" y="592"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<ggbscript onUpdate="ShowAxes[1,showAxis] SetCaption[E,If[showAxis,input+" = %v",input]] SetCaption[E',If[showAxis,input+"' = %v",input+"'"]]"/>
<caption val="Show coordinates"/>
</element>
<element type="boolean" label="showPoint">
<value val="true"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelOffset x="9" y="11"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<ggbscript onUpdate="SetValue[showPic,false]"/>
<caption val="Point"/>
</element>
<element type="boolean" label="showPic">
<value val="false"/>
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelOffset x="9" y="45"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<ggbscript onUpdate="SetValue[showPoint,false]"/>
<caption val="Triangle ABC"/>
</element>
<expression label="input" exp=""P""/>
<element type="text" label="input">
<show object="false" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<startPoint x="9.969999999999997" y="4.910000000000001" z="1"/>
</element>
<command name="Textfield">
<input a0="input"/>
<output a0="inputBox1"/>
</command>
<element type="textfield" label="inputBox1">
<show object="true" label="false" ev="3"/>
<objColor r="0" g="0" b="0" alpha="1"/>
<layer val="1"/>
<labelOffset x="112" y="11"/>
<labelMode val="3"/>
<animation step="1" speed="1" type="0" playing="false"/>
<auxiliary val="true"/>
<ggbscript onUpdate="SetCaption[E,If[showAxis,input+" = %v",input]] SetCaption[E',If[showAxis,input+"' = %v",input+"'"]]"/>
<linkedGeo exp="input"/>
<length val="2"/>
<caption val="="/>
</element>
<element type="point" label="E">
<show object="true" label="true"/>
<condition showObject="showPoint"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="1"/>
<labelOffset x="-2" y="-10"/>
<labelMode val="3"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="1" y="2" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
<caption val="P = %v"/>
</element>
<command name="Translate">
<input a0="E" a1="Vector[U, V]"/>
<output a0="E'"/>
</command>
<element type="point" label="E'">
<show object="true" label="true"/>
<condition showObject="showPoint ∧ showImage"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="1"/>
<labelOffset x="1" y="-6"/>
<labelMode val="3"/>
<selectionAllowed val="false"/>
<coords x="4" y="2" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
<caption val="P' = %v"/>
</element>
<element type="numeric" label="lang">
<value val="2"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.1"/>
<layer val="3"/>
<labelMode val="2"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<element type="button" label="button0">
<show object="true" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="3"/>
<labelOffset x="253" y="16"/>
<labelMode val="3"/>
<animation step="1" speed="1" type="0" playing="false"/>
<auxiliary val="true"/>
<ggbscript val="SetValue[lang,If[lang==1,2,1]] RunClickScript[buttonLang] "/>
<font serif="false" sizeM="1.4" size="10" style="0"/>
<caption val="中文"/>
</element>
<element type="button" label="buttonLang">
<show object="false" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="3"/>
<labelOffset x="150" y="563"/>
<labelMode val="0"/>
<animation step="1" speed="1" type="0" playing="false"/>
<auxiliary val="true"/>
<ggbscript val="SetCaption[button0,If[lang==1,"ENG","中文"]] SetCaption[showAxis,If[lang==1,"顯示坐標","Show coordinates"]] SetCaption[showImage,If[lang==1,"顯示平移影像","Show image"]] SetCaption[showPic,If[lang==1,"三角形ABC","Triangle ABC"]] SetCaption[showPoint,If[lang==1,"點","Point"]]"/>
<font serif="false" sizeM="2" size="24" style="0"/>
</element>
<expression label="a" exp="x(V) - x(U)" />
<element type="numeric" label="a">
<value val="3"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.1"/>
</element>
<expression label="b" exp="y(V) - y(U)" />
<element type="numeric" label="b">
<value val="0"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.1"/>
</element>
<expression label="text1eng" exp=""" + (If[a > 0, "translate " + (abs(a)) + " unit" + (If[abs(a) > 1, "s", ""]) + " to the right\\n", If[a < 0, "translate " + (abs(a)) + " unit" + (If[abs(a) > 1, "s", ""]) + " to the left\\n", ""]]) + "" + (If[b < 0, "translate " + (abs(b)) + " unit" + (If[abs(b) > 1, "s", ""]) + " downwards", If[b > 0, "translate " + (abs(b)) + " unit" + (If[abs(b) > 1, "s", ""]) + " upwards", ""]]) + """ />
<element type="text" label="text1eng">
<show object="true" label="true" ev="11"/>
<condition showObject="lang ≠ 1"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<bgColor r="255" g="255" b="255" alpha="255"/>
<layer val="3"/>
<labelMode val="0"/>
<absoluteScreenLocation x="15" y="197"/>
</element>
<expression label="text1" exp=""" + (LaTeX[If[a > 0, "向右平移" + (x(V) - x(U)) + "單位\\", If[a < 0, "向左平移" + (x(U) - x(V)) + "單位\\", ""]]]) + "" + (LaTeX[If[b > 0, "向上平移" + (y(V) - y(U)) + "單位", If[b < 0, "向下平移" + (y(U) - y(V)) + "單位", ""]]]) + """ />
<element type="text" label="text1">
<show object="true" label="true" ev="11"/>
<condition showObject="lang ≟ 1"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<bgColor r="255" g="255" b="255" alpha="255"/>
<layer val="1"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1.4" size="10" style="0"/>
<absoluteScreenLocation x="16" y="173"/>
</element>
</construction>
</geogebra>