Reflection Path (Corner Pocket)
2017-03-22 05:24
This GeoGebra applet demonstrates the reflection path of a billiard ball within a rectangular boundary. By calculating intersections of rays with polygon edges, it dynamically simulates the trajectory through multiple reflections until it reaches a corner pocket. Combining geometric construction and conditional logic, it visually illustrates the law of reflection in closed polygons, ideal for expl
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.345.0" id="f42dc667-7dad-4a5b-9f51-b7e7560aa010" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="902" height="561" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.7660753880266076" 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 | 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="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="1" visible="true" inframe="false" stylebar="true" location="3" size="691" 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="true" inframe="false" stylebar="true" location="1" size="201" window="100,100,600,400" />
<view id="2" visible="false" inframe="false" stylebar="false" location="3" size="313" window="100,100,250,400" />
<view id="16" visible="false" inframe="false" stylebar="false" location="1" size="474" 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="307" window="608,350,832,550" />
<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" />
</views>
<toolbar show="false" 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 || | 100007 100006 100005 100004 100003 100002 100001" position="1" help="false" />
<input show="false" cmd="true" top="algebra" />
<dockBar show="false" east="false" />
</perspective>
</perspectives>
<labelingStyle val="3"/>
<font size="16"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="691" height="559"/>
<coordSystem xZero="52.99999999999991" yZero="418.99999999999966" scale="49.9999999999999" yscale="49.999999999999986"/>
<evSettings axes="false" grid="true" 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="64" g="64" b="64"/>
<lineStyle axes="1" grid="20"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<spreadsheetView>
<size width="201" height="559"/>
<prefCellSize width="70" height="24"/>
<spreadsheetRow id="1" height="54"/>
<spreadsheetRow id="2" height="54"/>
<spreadsheetRow id="3" height="54"/>
<spreadsheetRow id="4" height="26"/>
<spreadsheetRow id="5" height="26"/>
<spreadsheetRow id="6" height="26"/>
<spreadsheetRow id="7" height="26"/>
<spreadsheetRow id="8" height="26"/>
<spreadsheetRow id="9" height="26"/>
<spreadsheetRow id="10" height="26"/>
<spreadsheetRow id="11" height="26"/>
<selection hScroll="0" vScroll="0" column="-1" row="-1"/>
<layout showFormulaBar="false" showGrid="true" showHScrollBar="true" showVScrollBar="true" showColumnHeader="true" showRowHeader ="true" allowSpecialEditor="false" allowToolTips="true" equalsRequired="false"/>
</spreadsheetView>
<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="">
<expression label ="x1" exp="0"/>
<element type="numeric" label="x1">
<value val="0"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<expression label ="x2" exp="4"/>
<element type="numeric" label="x2">
<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"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<expression label ="y1" exp="0"/>
<element type="numeric" label="y1">
<value val="0"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<expression label ="y2" exp="3"/>
<element type="numeric" label="y2">
<value val="3"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<element type="point" label="A">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<isShape val="false"/>
<coords x="1" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="point" label="B">
<show object="true" label="true" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<isShape val="false"/>
<coords x="2" y="2" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="PolyLine">
<input a0="(x1, y1)" a1="(x1, y2)" a2="(x2, y2)" a3="(x2, y1)" a4="(x1, y1)"/>
<output a0="box"/>
</command>
<element type="polyline" label="box">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<command name="Ray">
<input a0="A" a1="B"/>
<output a0="ray"/>
</command>
<element type="ray" label="ray">
<show object="false" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="-1" y="1" z="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Segment">
<input a0="(x1, y1)" a1="(x2, y1)"/>
<output a0="s1"/>
</command>
<element type="segment" label="s1">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="0" y="4" z="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Segment">
<input a0="(x2, y1)" a1="(x2, y2)"/>
<output a0="s2"/>
</command>
<element type="segment" label="s2">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="-3" y="0" z="12"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Segment">
<input a0="(x1, y2)" a1="(x2, y2)"/>
<output a0="s3"/>
</command>
<element type="segment" label="s3">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="0" y="4" z="-12"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Segment">
<input a0="(x1, y1)" a1="(x1, y2)"/>
<output a0="s4"/>
</command>
<element type="segment" label="s4">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="-3" y="0" z="0"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Intersect">
<input a0="ray" a1="s1"/>
<output a0="P1"/>
</command>
<element type="point" label="P1">
<show object="false" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Intersect">
<input a0="ray" a1="s2"/>
<output a0="P2"/>
</command>
<element type="point" label="P2">
<show object="false" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Intersect">
<input a0="ray" a1="s3"/>
<output a0="P3"/>
</command>
<element type="point" label="P3">
<show object="false" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="12" y="12" z="4"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Intersect">
<input a0="ray" a1="s4"/>
<output a0="P4"/>
</command>
<element type="point" label="P4">
<show object="false" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="RemoveUndefined">
<input a0="{P1, P2, P3, P4}"/>
<output a0="inters"/>
</command>
<element type="list" label="inters">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<bgColor r="255" g="255" b="255" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="-1"/>
</element>
<command name="Remove">
<input a0="Remove[inters, {A}]" a1="{A}"/>
<output a0="removeStartPoint"/>
</command>
<element type="list" label="removeStartPoint">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<bgColor r="255" g="255" b="255" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="-1"/>
</element>
<expression label="Q" exp="removeStartPoint(1)" type="point" />
<element type="point" label="Q">
<show object="true" label="true" ev="4"/>
<objColor r="125" g="125" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="3" y="3" z="1"/>
<pointSize val="2"/>
<pointStyle val="0"/>
</element>
<command name="Length">
<input a0="removeStartPoint"/>
<output a0="n"/>
</command>
<element type="numeric" label="n">
<value val="1"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="If">
<input a0="n ≟ 1" a1="If[x(Q) ≟ x1 ∨ x(Q) ≟ x2, Mirror[A, x = x(Q)], Mirror[A, y = y(Q)]]" a2="If[Q ≟ (x1, y1), (x1 - 1, y1 - 1), Q ≟ (x2, y1), (x2 + 1, y1 - 1), Q ≟ (x2, y2), (x2 + 1, y2 + 1), Q ≟ (x1, y2), (x1 - 1, y2 + 1)]"/>
<output a0="C"/>
</command>
<element type="point" label="C">
<show object="false" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="1" y="5" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Polygon">
<input a0="{(x1, y1), (x1, y2), (x2, y2), (x2, y1)}"/>
<output a0="poly"/>
</command>
<element type="polygon" label="poly">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="188" g="212" b="230" alpha="0.44999998807907104"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
</element>
<element type="point" label="D">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="255" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<isShape val="false"/>
<coords x="5" y="-1" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<element type="point" label="E">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="255" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<isShape val="false"/>
<coords x="11" y="7" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Min">
<input a0="x(D)" a1="x(E)"/>
<output a0="a1"/>
</command>
<element type="numeric" label="a1">
<value val="5"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="Max">
<input a0="x(D)" a1="x(E)"/>
<output a0="a2"/>
</command>
<element type="numeric" label="a2">
<value val="11"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="Max">
<input a0="y(D)" a1="y(E)"/>
<output a0="b2"/>
</command>
<element type="numeric" label="b2">
<value val="7"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="Min">
<input a0="y(D)" a1="y(E)"/>
<output a0="b1"/>
</command>
<element type="numeric" label="b1">
<value val="-1"/>
<symbolic val="true" />
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="Box">
<input a0="a1" a1="a2" a2="b1" a3="b2"/>
<output a0="box2"/>
</command>
<element type="polyline" label="box2">
<lineStyle thickness="6" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<command name="PointIn">
<input a0="BoxFilled[a1, a2, b1, b2]"/>
<output a0="F"/>
</command>
<element type="point" label="F">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="0" playing="false"/>
<isShape val="false"/>
<coords x="7" y="3" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
</element>
<command name="ReflectionPoint">
<input a0="x1" a1="x2" a2="y1" a3="y2" a4="Q" a5="(2 * Q) - C"/>
<output a0="H"/>
</command>
<element type="point" label="H">
<show object="false" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="4" y="2" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="BoxFilled">
<input a0="a1" a1="a2" a2="b1" a3="b2"/>
<output a0="poly2"/>
</command>
<element type="polygon" label="poly2">
<lineStyle thickness="2" type="0" typeHidden="1"/>
<show object="true" label="false" ev="4"/>
<objColor r="191" g="255" b="0" alpha="0.25"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
</element>
<command name="PointIn">
<input a0="poly2"/>
<output a0="G"/>
</command>
<element type="point" label="G">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<animation step="0.1" speed="1" type="0" playing="false"/>
<isShape val="false"/>
<coords x="8" y="1" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="ReflectPoint">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="F" a5="G"/>
<output a0="A1"/>
</command>
<element type="point" label="A1">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<coords x="9" y="-1" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="F" a5="G"/>
<output a0="A2"/>
</command>
<element type="point" label="A2">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<coords x="11" y="3" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A1" a5="A2"/>
<output a0="A3"/>
</command>
<element type="point" label="A3">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<coords x="9" y="7" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A2" a5="A3"/>
<output a0="A4"/>
</command>
<element type="point" label="A4">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="5" y="-1" z="1"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A3" a5="A4"/>
<output a0="A5"/>
</command>
<element type="point" label="A5">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A4" a5="A5"/>
<output a0="A6"/>
</command>
<element type="point" label="A6">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A5" a5="A6"/>
<output a0="A7"/>
</command>
<element type="point" label="A7">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A6" a5="A7"/>
<output a0="A8"/>
</command>
<element type="point" label="A8">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A7" a5="A8"/>
<output a0="A9"/>
</command>
<element type="point" label="A9">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A8" a5="A9"/>
<output a0="A10"/>
</command>
<element type="point" label="A10">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A9" a5="A10"/>
<output a0="A11"/>
</command>
<element type="point" label="A11">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="NextReflect">
<input a0="a1" a1="a2" a2="b1" a3="b2" a4="A10" a5="A11"/>
<output a0="A12"/>
</command>
<element type="point" label="A12">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<pointSize val="3"/>
<pointStyle val="0"/>
</element>
<command name="Vector">
<input a0="A1" a1="A2"/>
<output a0="B2"/>
</command>
<element type="vector" label="B2">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="2" y="4" z="0"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A1"/>
</element>
<command name="Vector">
<input a0="A2" a1="A3"/>
<output a0="B3"/>
</command>
<element type="vector" label="B3">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="-2" y="4" z="0"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A2"/>
</element>
<command name="Vector">
<input a0="A3" a1="A4"/>
<output a0="B4"/>
</command>
<element type="vector" label="B4">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="-4" y="-8" z="0"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A3"/>
</element>
<command name="Vector">
<input a0="A4" a1="A5"/>
<output a0="B5"/>
</command>
<element type="vector" label="B5">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A4"/>
</element>
<command name="Vector">
<input a0="A5" a1="A6"/>
<output a0="B6"/>
</command>
<element type="vector" label="B6">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A5"/>
</element>
<command name="Vector">
<input a0="A6" a1="A7"/>
<output a0="B7"/>
</command>
<element type="vector" label="B7">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A6"/>
</element>
<command name="Vector">
<input a0="A7" a1="A8"/>
<output a0="B8"/>
</command>
<element type="vector" label="B8">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A7"/>
</element>
<command name="Vector">
<input a0="A8" a1="A9"/>
<output a0="B9"/>
</command>
<element type="vector" label="B9">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A8"/>
</element>
<command name="Vector">
<input a0="A9" a1="A10"/>
<output a0="B10"/>
</command>
<element type="vector" label="B10">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A9"/>
</element>
<command name="Vector">
<input a0="A10" a1="A11"/>
<output a0="B11"/>
</command>
<element type="vector" label="B11">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A10"/>
</element>
<command name="Vector">
<input a0="A11" a1="A12"/>
<output a0="B12"/>
</command>
<element type="vector" label="B12">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="NaN" y="NaN" z="NaN"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="A11"/>
</element>
<command name="Vector">
<input a0="F" a1="G"/>
<output a0="u"/>
</command>
<element type="vector" label="u">
<show object="true" label="false"/>
<objColor r="75" g="0" b="130" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="1" y="-2" z="0"/>
<lineStyle thickness="7" type="0" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="F"/>
</element>
<command name="If">
<input a0="n ≟ 1" a1="If[x(Q) ≟ x1 ∨ x(Q) ≟ x2, Mirror[A, x = x(Q)], Mirror[A, y = y(Q)]]" a2="NaN"/>
<output a0="C'"/>
</command>
<element type="point" label="C'">
<show object="true" label="true" ev="4"/>
<objColor r="255" g="127" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="1" y="5" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="ReflectionPoint">
<input a0="x1" a1="x2" a2="y1" a3="y2" a4="Q" a5="(2 * Q) - C'"/>
<output a0="H'"/>
</command>
<element type="point" label="H'">
<show object="true" label="true" ev="4"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="4" y="2" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
</element>
<command name="Segment">
<input a0="C'" a1="Q"/>
<output a0="g"/>
</command>
<element type="segment" label="g">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="2" y="2" z="-12"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Segment">
<input a0="A" a1="C'"/>
<output a0="h"/>
</command>
<element type="segment" label="h">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isShape val="false"/>
<coords x="-4" y="0" z="4"/>
<lineStyle thickness="4" type="20" typeHidden="1"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="PolyLine">
<input a0="A" a1="Q" a2="H'"/>
<output a0="f"/>
</command>
<element type="polyline" label="f">
<lineStyle thickness="5" type="20" typeHidden="1"/>
<show object="true" label="false" ev="8"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
</element>
<command name="Vector">
<input a0="F" a1="A1"/>
<output a0="B1"/>
</command>
<element type="vector" label="B1">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<isShape val="false"/>
<auxiliary val="true"/>
<coords x="2" y="-4" z="0"/>
<lineStyle thickness="3" type="20" typeHidden="1"/>
<coordStyle style="cartesian"/>
<startPoint exp="F"/>
</element>
</construction>
</geogebra>