Quadrilateral Construction Exercise (Fixed Side)
2020-09-12 09:31
This GeoGebra example demonstrates how to construct quadrilaterals with one fixed side. Using Vector and Segment commands to build geometric objects, students can interactively drag vertices to form different quadrilaterals. The system leverages CountIf, Sequence, and IndexOf commands to automatically detect and count valid quadrilateral constructions, distinguishing results with blue and red segm
In collections
P4 Math: Constructing Quadrilaterals
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.672.0" app="classic" platform="w" id="77641951-E235-4521-8394-7ED5F5E12D1F" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/apps/xsd/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="1150" height="645" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.1808695652173913" 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="2" visible="false" inframe="false" stylebar="true" location="3,3" size="208" tab="ALGEBRA" 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="412" window="100,100,700,550" />
<view id="1" visible="true" inframe="false" stylebar="false" location="3" size="208" window="100,100,600,400" />
<view id="16" visible="true" inframe="false" stylebar="false" location="1" size="934" 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" />
</views>
<toolbar show="true" items="0 | 62 | 17 | 73 | 6" position="1" help="false" />
<input show="false" cmd="true" top="algebra" />
<dockBar show="false" east="false" />
</perspective>
</perspectives>
<labelingStyle val="0"/>
<font size="16"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="207" height="591"/>
<coordSystem xZero="1004.1179543957577" yZero="260.21836371369915" scale="65.21357406145266" yscale="65.21357406145313"/>
<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="933" height="591"/>
<coordSystem xZero="9.289350258904937" yZero="650.872123219895" scale="52.647791838842984" yscale="52.647791838842956"/>
<evSettings axes="false" grid="true" gridIsBold="false" pointCapturing="2" 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>
<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="button" label="buttonNewQ">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelOffset x="50" y="558"/>
<labelMode val="3"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="UpdateConstruction[];
SetValue(ShowAns,false);

SetValue[Blue1a, (1,12)];
SetValue[Blue1b, (3,12)];
SetValue[Blue2a, (1,11)];
SetValue[Blue2b, (3,11)];
SetValue[Blue3a, (1,10)];
SetValue[Blue3b, (3,10)];
SetValue[Reda, (RandomElement({3, 4, 5, 6, 7, 8, 9, 11}), RandomElement({4, 5, 6, 7, 8, 9})) ];
SetValue[Redb0, (RandomElement({3, 4, 5, 6, 7, 8, 9, 11}), RandomElement({4, 5, 6, 7, 8, 9}))];

SetValue[Redb, If( Reda==Redb0, Redb0 + Vec03, Redb0 ) ];
SetValue[Redb, If( QuadType == 3 || QuadType == 4 , Reda + RanVecRectOrSq, If( QuadType == 5, Reda + RanVecRhom, Redb)) ];

SetFixed(Blue1a,false);
SetFixed(Blue1b,false);
SetFixed(Blue2a,false);
SetFixed(Blue2b,false);
SetFixed(Blue3a,false);
SetFixed(Blue3b,false);
SetFixed(Reda, true);
SetFixed(Redb, true);

SetFixed(Blue1,false);
SetFixed(Blue2,false);
SetFixed(Blue3,false);
SetFixed(Red,true)"/>
<font serif="false" sizeM="2" size="16" style="0"/>
<startPoint x="-14.7" y="-3.9" z="1"/>
<caption val="新題目"/>
</element>
<command name="Vector">
<input a0="(2, 3)"/>
<output a0="Vec21"/>
</command>
<element type="vector" label="Vec21">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="2" y="3" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(-1, 2)"/>
<output a0="Vec18"/>
</command>
<element type="vector" label="Vec18">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-1" y="2" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(-1, -1)"/>
<output a0="Vec06"/>
</command>
<element type="vector" label="Vec06">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-1" y="-1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(2, 1)"/>
<output a0="Vec05"/>
</command>
<element type="vector" label="Vec05">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="2" y="1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(1, 1)"/>
<output a0="Vec04"/>
</command>
<element type="vector" label="Vec04">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="1" y="1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(1, -1)"/>
<output a0="Vec10"/>
</command>
<element type="vector" label="Vec10">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="1" y="-1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(-1, 1)"/>
<output a0="Vec11"/>
</command>
<element type="vector" label="Vec11">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-1" y="1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(2, -1)"/>
<output a0="Vec12"/>
</command>
<element type="vector" label="Vec12">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="2" y="-1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(1, 2)"/>
<output a0="Vec16"/>
</command>
<element type="vector" label="Vec16">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="1" y="2" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(1, -2)"/>
<output a0="Vec17"/>
</command>
<element type="vector" label="Vec17">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="1" y="-2" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(3, -2)"/>
<output a0="Vec15"/>
</command>
<element type="vector" label="Vec15">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3" y="-2" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(4, -1)"/>
<output a0="Vec14"/>
</command>
<element type="vector" label="Vec14">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="4" y="-1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(3, -1)"/>
<output a0="Vec13"/>
</command>
<element type="vector" label="Vec13">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3" y="-1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(4, 1)"/>
<output a0="Vec09"/>
</command>
<element type="vector" label="Vec09">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="4" y="1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(3, 2)"/>
<output a0="Vec08"/>
</command>
<element type="vector" label="Vec08">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3" y="2" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(3, 1)"/>
<output a0="Vec07"/>
</command>
<element type="vector" label="Vec07">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3" y="1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(1, 3)"/>
<output a0="Vec19"/>
</command>
<element type="vector" label="Vec19">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="1" y="3" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(-1, 3)"/>
<output a0="Vec20"/>
</command>
<element type="vector" label="Vec20">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="-1" y="3" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(1, 0)"/>
<output a0="Vec01"/>
</command>
<element type="vector" label="Vec01">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="1" y="0" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(2, 0)"/>
<output a0="Vec02"/>
</command>
<element type="vector" label="Vec02">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="2" y="0" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<command name="Vector">
<input a0="(0, 1)"/>
<output a0="Vec03"/>
</command>
<element type="vector" label="Vec03">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="0" y="1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<element type="boolean" label="ShowAns">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<expression label="Blue1a" exp="(1, 12)" type="point"/>
<element type="point" label="Blue1a">
<show object="true" label="false" ev="11"/>
<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"/>
<coords x="1" y="12" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
</element>
<expression label="Blue1b" exp="(3, 12)" type="point"/>
<element type="point" label="Blue1b">
<show object="true" label="false" ev="11"/>
<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"/>
<coords x="3" y="12" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
</element>
<command name="Segment">
<input a0="Blue1a" a1="Blue1b"/>
<output a0="Blue1"/>
</command>
<element type="segment" label="Blue1">
<show object="true" label="false" ev="3"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="0" y="2" z="-24"/>
<lineStyle thickness="7" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<expression label="Blue2a" exp="(1, 11)" type="point"/>
<element type="point" label="Blue2a">
<show object="true" label="false" ev="11"/>
<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"/>
<coords x="1" y="11" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
</element>
<expression label="Blue2b" exp="(3, 11)" type="point"/>
<element type="point" label="Blue2b">
<show object="true" label="false" ev="11"/>
<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"/>
<coords x="3" y="11" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
</element>
<command name="Segment">
<input a0="Blue2a" a1="Blue2b"/>
<output a0="Blue2"/>
</command>
<element type="segment" label="Blue2">
<show object="true" label="false" ev="3"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="0" y="2" z="-22"/>
<lineStyle thickness="7" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<expression label="Blue3a" exp="(1, 10)" type="point"/>
<element type="point" label="Blue3a">
<show object="true" label="false" ev="11"/>
<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"/>
<coords x="1" y="10" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
</element>
<expression label="Blue3b" exp="(3, 10)" type="point"/>
<element type="point" label="Blue3b">
<show object="true" label="false" ev="3"/>
<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"/>
<coords x="3" y="10" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
</element>
<command name="Segment">
<input a0="Blue3a" a1="Blue3b"/>
<output a0="Blue3"/>
</command>
<element type="segment" label="Blue3">
<show object="true" label="false" ev="3"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="0" y="2" z="-20"/>
<lineStyle thickness="7" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<element type="point" label="Reda">
<show object="true" label="false" ev="3"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<coords x="4" y="7" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
</element>
<element type="point" label="Redb">
<show object="true" label="false" ev="11"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<coords x="9" y="4" z="1"/>
<pointSize val="7"/>
<pointStyle val="0"/>
</element>
<command name="Segment">
<input a0="Reda" a1="Redb"/>
<output a0="Red"/>
</command>
<element type="segment" label="Red">
<show object="true" label="false" ev="3"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<coords x="3" y="5" z="-47"/>
<lineStyle thickness="7" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<expression label="ListPoints" exp="{Blue1a, Blue1b, Blue2a, Blue2b, Blue3a, Blue3b, Reda, Redb}" />
<element type="list" label="ListPoints">
<show object="true" label="true" ev="3"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="CountIf">
<input a0="A ≟ Blue1a" a1="A" a2="ListPoints"/>
<output a0="NumBlue1a"/>
</command>
<element type="numeric" label="NumBlue1a">
<value val="1"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="CountIf">
<input a0="A ≟ Blue1b" a1="A" a2="ListPoints"/>
<output a0="NumBlue1b"/>
</command>
<element type="numeric" label="NumBlue1b">
<value val="1"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="CountIf">
<input a0="A ≟ Blue2a" a1="A" a2="ListPoints"/>
<output a0="NumBlue2a"/>
</command>
<element type="numeric" label="NumBlue2a">
<value val="1"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="CountIf">
<input a0="A ≟ Blue2b" a1="A" a2="ListPoints"/>
<output a0="NumBlue2b"/>
</command>
<element type="numeric" label="NumBlue2b">
<value val="1"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="CountIf">
<input a0="A ≟ Blue3a" a1="A" a2="ListPoints"/>
<output a0="NumBlue3a"/>
</command>
<element type="numeric" label="NumBlue3a">
<value val="1"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="CountIf">
<input a0="A ≟ Blue3b" a1="A" a2="ListPoints"/>
<output a0="NumBlue3b"/>
</command>
<element type="numeric" label="NumBlue3b">
<value val="1"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="CountIf">
<input a0="A ≟ Reda" a1="A" a2="ListPoints"/>
<output a0="NumReda"/>
</command>
<element type="numeric" label="NumReda">
<value val="1"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="CountIf">
<input a0="A ≟ Redb" a1="A" a2="ListPoints"/>
<output a0="NumRedb"/>
</command>
<element type="numeric" label="NumRedb">
<value val="1"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<element type="boolean" label="TestConnected1">
<value val="true"/>
<show object="false" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="TestConnected2">
<value val="true"/>
<show object="false" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="button" label="buttonShowAndCheckAns">
<show object="true" label="true"/>
<objColor r="255" g="255" b="102" alpha="1"/>
<bgColor r="127" g="0" b="255" alpha="255"/>
<layer val="0"/>
<labelOffset x="43" y="369"/>
<labelMode val="3"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="SetValue(ShowAns,true);

If( NumBlue1a == 2 && NumBlue1b == 2 && NumBlue2a == 2 && NumBlue2b == 2 && NumBlue3a == 2 && NumBlue3b == 2 && NumReda == 2 && NumRedb == 2, SetValue(TestConnected1, true), SetValue(TestConnected1, false))

If( ( Defined(Intersect(Blue1,Blue2)) && Defined(Intersect(Blue1,Blue3)) && Defined(Intersect(Blue2,Red)) && Defined(Intersect(Blue3,Red)) ) && (!Defined(Intersect(Blue1,Red))) && (!Defined(Intersect(Blue2,Blue3))) || ( Defined(Intersect(Blue1,Blue2)) && Defined(Intersect(Blue1,Red)) && Defined(Intersect(Blue2,Blue3)) && Defined(Intersect(Red,Blue3)) ) && (!Defined(Intersect(Blue1,Blue3))) && (!Defined(Intersect(Blue2,Red))) || ( Defined(Intersect(Blue1,Blue3)) && Defined(Intersect(Blue1,Red)) && Defined(Intersect(Blue3,Blue2)) && Defined(Intersect(Red,Blue2)) && (!Defined(Intersect(Blue1,Blue2))) && (!Defined(Intersect(Blue3,Red))) ) , SetValue(TestConnected2, true), SetValue(TestConnected2, false));

If( TestConnected1 && TestConnected2, SetValue(IsQuad, true), SetValue(IsQuad, false) );

If( ( (AreParallel(Blue1,Blue2) && !AreParallel(Blue3,Red) ) || (AreParallel(Blue1,Blue3) && !AreParallel(Blue2,Red) ) || (AreParallel(Blue1,Red) && !AreParallel(Blue2,Blue3) ) || (AreParallel(Blue2,Blue3) && !AreParallel(Blue1,Red) ) || (AreParallel(Blue2,Red) && !AreParallel(Blue1,Blue3) ) || (AreParallel(Blue3,Red) && !AreParallel(Blue1,Blue2)) ) && IsQuad, SetValue(IsTrape, true), SetValue(IsTrape, false) );

If( ( (AreParallel(Blue1,Blue2) && AreParallel(Blue3,Red) ) || (AreParallel(Blue1,Blue3) && AreParallel(Blue2,Red) ) || (AreParallel(Blue1,Red) && AreParallel(Blue2,Blue3) ) || (AreParallel(Blue2,Blue3) && AreParallel(Blue1,Red) ) || (AreParallel(Blue2,Red) && AreParallel(Blue1,Blue3) ) || (AreParallel(Blue3,Red) && AreParallel(Blue1,Blue2)) ) && IsQuad, SetValue(IsPara, true), SetValue(IsPara, false) );

If( (ArePerpendicular(Blue1,Blue2) || ArePerpendicular(Blue1,Blue3) ) && IsPara, SetValue(IsRect, true), SetValue(IsRect, false) );

If( Length(Blue1)==Length(Blue2) && Length(Blue1)==Length(Blue3) && IsPara, SetValue(IsRhom, true), SetValue(IsRhom, false) );

If( IsRect && IsRhom, SetValue(IsSq, true), SetValue(IsSq, false) );

If( QuadType==1 && IsQuad, SetValue[Answer, true], QuadType==2 && IsPara, SetValue[Answer, true], QuadType==3 && IsRect, SetValue[Answer, true], QuadType==4 && IsSq, SetValue[Answer, true], QuadType==5 && IsRhom, SetValue[Answer, true], QuadType==6 && IsTrape, SetValue[Answer, true], SetValue[Answer, false])
"/>
<font serif="false" sizeM="2" size="16" style="0"/>
<startPoint x="-14.8" y="0" z="1"/>
<caption val="檢查答案"/>
</element>
<element type="boolean" label="IsQuad">
<value val="true"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="Answer">
<value val="true"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="IsPara">
<value val="true"/>
<show object="false" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="IsTrape">
<value val="false"/>
<show object="false" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="IsSq">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="IsRect">
<value val="true"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<element type="boolean" label="IsRhom">
<value val="false"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<expression label="ListQuadType" exp="{"四邊形", "平行四邊形", "長方形", "正方形", "菱形", "梯形"}"/>
<element type="list" label="ListQuadType">
<show object="true" label="true" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelOffset x="14" y="140"/>
<labelMode val="0"/>
<fixed val="true"/>
<ggbscript onUpdate="UpdateConstruction[];
SetValue(ShowAns,false);

SetValue[Blue1a, (1,12)];
SetValue[Blue1b, (3,12)];
SetValue[Blue2a, (1,11)];
SetValue[Blue2b, (3,11)];
SetValue[Blue3a, (1,10)];
SetValue[Blue3b, (3,10)];
SetValue[Reda, (RandomElement({3, 4, 5, 6, 7, 8, 9, 11}), RandomElement({4, 5, 6, 7, 8, 9})) ];
SetValue[Redb0, (RandomElement({3, 4, 5, 6, 7, 8, 9, 11}), RandomElement({4, 5, 6, 7, 8, 9}))];

SetValue[Redb, If( Reda==Redb0, Redb0 + Vec03, Redb0 ) ];
SetValue[Redb, If( QuadType == 3 || QuadType == 4 , Reda + RanVecRectOrSq, If( QuadType == 5, Reda + RanVecRhom, Redb)) ];

SetFixed(Blue1a,false);
SetFixed(Blue1b,false);
SetFixed(Blue2a,false);
SetFixed(Blue2b,false);
SetFixed(Blue3a,false);
SetFixed(Blue3b,false);
SetFixed(Reda, true);
SetFixed(Redb, true);

SetFixed(Blue1,false);
SetFixed(Blue2,false);
SetFixed(Blue3,false);
SetFixed(Red,true)"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<comboBox val="true"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<font serif="false" sizeM="1.4" size="7" style="0"/>
<angleStyle val="0"/>
<symbolic val="true" />
</element>
<expression label="textInstruction" exp=""移動線段,製作
各類四邊形。""/>
<element type="text" label="textInstruction">
<show object="true" label="true" ev="40"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<bgColor r="255" g="255" b="153" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<font serif="false" sizeM="1.4" size="7" style="0"/>
<startPoint x="-15.301437577417365" y="3.5913983205710323" z="1"/>
</element>
<element type="button" label="buttonGridDot">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<bgColor r="191" g="255" b="0" alpha="255"/>
<layer val="0"/>
<labelOffset x="13" y="92"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="SetValue(ShowDots, !ShowDots);
ShowGrid(2, !ShowDots)"/>
<font serif="false" sizeM="2" size="16" style="0"/>
<startPoint x="-15.308730327131256" y="2.803781351471117" z="1"/>
<caption val="格線 / 釘點"/>
</element>
<element type="button" label="buttonHideAns">
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<bgColor r="255" g="192" b="203" alpha="255"/>
<layer val="0"/>
<labelOffset x="57" y="497"/>
<labelMode val="0"/>
<fixed val="true"/>
<auxiliary val="true"/>
<ggbscript val="ShowAns=false"/>
<font serif="false" sizeM="1.4" size="7" style="0"/>
<startPoint x="-14.6" y="-2.1" z="1"/>
<caption val="隱藏答案"/>
</element>
<expression label="textRight" exp=""正確""/>
<element type="text" label="textRight">
<show object="true" label="true" ev="40"/>
<condition showObject="ShowAns ∧ Answer"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<bgColor r="0" g="255" b="0" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<font serif="false" sizeM="2" size="16" style="0"/>
<startPoint x="-15" y="-1.4" z="1"/>
</element>
<expression label="textWrong" exp=""不對""/>
<element type="text" label="textWrong">
<show object="true" label="true" ev="40"/>
<condition showObject="ShowAns ∧ (¬Answer)"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<bgColor r="255" g="215" b="0" alpha="255"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<font serif="false" sizeM="2" size="16" style="0"/>
<startPoint x="-13.5" y="-1.4" z="1"/>
</element>
<command name="IndexOf">
<input a0="SelectedElement[ListQuadType]" a1="ListQuadType"/>
<output a0="QuadType"/>
</command>
<element type="numeric" label="QuadType">
<value val="1"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="Sequence">
<input a0="Sequence[(s, t), s, 0, 23]" a1="t" a2="-3" a3="15"/>
<output a0="ListDots" randomResult="{{(0, -3), (1, -3), (2, -3), (3, -3), (4, -3), (5, -3), (6, -3), (7, -3), (8, -3), (9, -3), (10, -3), (11, -3), (12, -3), (13, -3), (14, -3), (15, -3), (16, -3), (17, -3), (18, -3), (19, -3), (20, -3), (21, -3), (22, -3), (23, -3)}, {(0, -2), (1, -2), (2, -2), (3, -2), (4, -2), (5, -2), (6, -2), (7, -2), (8, -2), (9, -2), (10, -2), (11, -2), (12, -2), (13, -2), (14, -2), (15, -2), (16, -2), (17, -2), (18, -2), (19, -2), (20, -2), (21, -2), (22, -2), (23, -2)}, {(0, -1), (1, -1), (2, -1), (3, -1), (4, -1), (5, -1), (6, -1), (7, -1), (8, -1), (9, -1), (10, -1), (11, -1), (12, -1), (13, -1), (14, -1), (15, -1), (16, -1), (17, -1), (18, -1), (19, -1), (20, -1), (21, -1), (22, -1), (23, -1)}, {(0, 0), (1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0), (8, 0), (9, 0), (10, 0), (11, 0), (12, 0), (13, 0), (14, 0), (15, 0), (16, 0), (17, 0), (18, 0), (19, 0), (20, 0), (21, 0), (22, 0), (23, 0)}, {(0, 1), (1, 1), (2, 1), (3, 1), (4, 1), (5, 1), (6, 1), (7, 1), (8, 1), (9, 1), (10, 1), (11, 1), (12, 1), (13, 1), (14, 1), (15, 1), (16, 1), (17, 1), (18, 1), (19, 1), (20, 1), (21, 1), (22, 1), (23, 1)}, {(0, 2), (1, 2), (2, 2), (3, 2), (4, 2), (5, 2), (6, 2), (7, 2), (8, 2), (9, 2), (10, 2), (11, 2), (12, 2), (13, 2), (14, 2), (15, 2), (16, 2), (17, 2), (18, 2), (19, 2), (20, 2), (21, 2), (22, 2), (23, 2)}, {(0, 3), (1, 3), (2, 3), (3, 3), (4, 3), (5, 3), (6, 3), (7, 3), (8, 3), (9, 3), (10, 3), (11, 3), (12, 3), (13, 3), (14, 3), (15, 3), (16, 3), (17, 3), (18, 3), (19, 3), (20, 3), (21, 3), (22, 3), (23, 3)}, {(0, 4), (1, 4), (2, 4), (3, 4), (4, 4), (5, 4), (6, 4), (7, 4), (8, 4), (9, 4), (10, 4), (11, 4), (12, 4), (13, 4), (14, 4), (15, 4), (16, 4), (17, 4), (18, 4), (19, 4), (20, 4), (21, 4), (22, 4), (23, 4)}, {(0, 5), (1, 5), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (7, 5), (8, 5), (9, 5), (10, 5), (11, 5), (12, 5), (13, 5), (14, 5), (15, 5), (16, 5), (17, 5), (18, 5), (19, 5), (20, 5), (21, 5), (22, 5), (23, 5)}, {(0, 6), (1, 6), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (7, 6), (8, 6), (9, 6), (10, 6), (11, 6), (12, 6), (13, 6), (14, 6), (15, 6), (16, 6), (17, 6), (18, 6), (19, 6), (20, 6), (21, 6), (22, 6), (23, 6)}, {(0, 7), (1, 7), (2, 7), (3, 7), (4, 7), (5, 7), (6, 7), (7, 7), (8, 7), (9, 7), (10, 7), (11, 7), (12, 7), (13, 7), (14, 7), (15, 7), (16, 7), (17, 7), (18, 7), (19, 7), (20, 7), (21, 7), (22, 7), (23, 7)}, {(0, 8), (1, 8), (2, 8), (3, 8), (4, 8), (5, 8), (6, 8), (7, 8), (8, 8), (9, 8), (10, 8), (11, 8), (12, 8), (13, 8), (14, 8), (15, 8), (16, 8), (17, 8), (18, 8), (19, 8), (20, 8), (21, 8), (22, 8), (23, 8)}, {(0, 9), (1, 9), (2, 9), (3, 9), (4, 9), (5, 9), (6, 9), (7, 9), (8, 9), (9, 9), (10, 9), (11, 9), (12, 9), (13, 9), (14, 9), (15, 9), (16, 9), (17, 9), (18, 9), (19, 9), (20, 9), (21, 9), (22, 9), (23, 9)}, {(0, 10), (1, 10), (2, 10), (3, 10), (4, 10), (5, 10), (6, 10), (7, 10), (8, 10), (9, 10), (10, 10), (11, 10), (12, 10), (13, 10), (14, 10), (15, 10), (16, 10), (17, 10), (18, 10), (19, 10), (20, 10), (21, 10), (22, 10), (23, 10)}, {(0, 11), (1, 11), (2, 11), (3, 11), (4, 11), (5, 11), (6, 11), (7, 11), (8, 11), (9, 11), (10, 11), (11, 11), (12, 11), (13, 11), (14, 11), (15, 11), (16, 11), (17, 11), (18, 11), (19, 11), (20, 11), (21, 11), (22, 11), (23, 11)}, {(0, 12), (1, 12), (2, 12), (3, 12), (4, 12), (5, 12), (6, 12), (7, 12), (8, 12), (9, 12), (10, 12), (11, 12), (12, 12), (13, 12), (14, 12), (15, 12), (16, 12), (17, 12), (18, 12), (19, 12), (20, 12), (21, 12), (22, 12), (23, 12)}, {(0, 13), (1, 13), (2, 13), (3, 13), (4, 13), (5, 13), (6, 13), (7, 13), (8, 13), (9, 13), (10, 13), (11, 13), (12, 13), (13, 13), (14, 13), (15, 13), (16, 13), (17, 13), (18, 13), (19, 13), (20, 13), (21, 13), (22, 13), (23, 13)}, {(0, 14), (1, 14), (2, 14), (3, 14), (4, 14), (5, 14), (6, 14), (7, 14), (8, 14), (9, 14), (10, 14), (11, 14), (12, 14), (13, 14), (14, 14), (15, 14), (16, 14), (17, 14), (18, 14), (19, 14), (20, 14), (21, 14), (22, 14), (23, 14)}, {(0, 15), (1, 15), (2, 15), (3, 15), (4, 15), (5, 15), (6, 15), (7, 15), (8, 15), (9, 15), (10, 15), (11, 15), (12, 15), (13, 15), (14, 15), (15, 15), (16, 15), (17, 15), (18, 15), (19, 15), (20, 15), (21, 15), (22, 15), (23, 15)}}"/>
</command>
<element type="list" label="ListDots">
<show object="true" label="true" ev="7"/>
<condition showObject="ShowDots"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<element type="boolean" label="ShowDots">
<value val="false"/>
<show object="false" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
<expression label="ListVec01" exp="{Vec01, (2 * Vec01), (3 * Vec01), (4 * Vec01), Vec02, (2 * Vec02), Vec03, (2 * Vec03), Vec04, (2 * Vec04), Vec05, (2 * Vec05), Vec06, Vec10, (2 * Vec10), Vec11, (2 * Vec11), Vec12, (2 * Vec12), Vec16, Vec17}" />
<element type="list" label="ListVec01">
<show object="false" label="true"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="RandomElement">
<input a0="ListVec01"/>
<output a0="RanVecRectOrSq"/>
</command>
<element type="vector" label="RanVecRectOrSq">
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="2" y="-1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
<expression label="Redb0" exp="(RandomElement[{4, 5, 6, 7, 8, 9, 11, 12, 13, 14}], RandomElement[{4, 5, 6, 7, 8, 9}])" type="point" />
<element type="point" label="Redb0">
<show object="false" label="true"/>
<objColor r="68" g="68" b="68" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="11" y="9" z="1"/>
<pointSize val="4"/>
<pointStyle val="0"/>
</element>
<expression label="ListVec02" exp="{Vec04, (2 * Vec04), (3 * Vec04), Vec05, (2 * Vec05), Vec06, Vec07, Vec08, Vec09, Vec10, (2 * Vec10), (3 * Vec10), Vec11, (2 * Vec11), Vec12, (2 * Vec12), Vec13, Vec14, Vec15, Vec16, Vec17, Vec18, Vec19, Vec20, Vec21}" />
<element type="list" label="ListVec02">
<show object="false" label="true"/>
<objColor r="0" g="100" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<angleStyle val="0"/>
</element>
<command name="RandomElement">
<input a0="ListVec02"/>
<output a0="RanVecRhom"/>
</command>
<element type="vector" label="RanVecRhom">
<show object="false" label="true" ev="3"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<coords x="3" y="1" z="0"/>
<lineStyle thickness="5" type="0" typeHidden="1" opacity="178"/>
<coordStyle style="cartesian"/>
</element>
</construction>
</geogebra>