Positional Relationships in a Grid
2020-12-30 01:57
This GeoGebra applet demonstrates random positional relationships of points, segments, and angles within a grid. Using commands like Random, Segment, Sequence, and Angle, it dynamically generates random segments and intersections, displaying related angles and geometric constraints. Combining conditional statements and sequence generation, it is ideal for exploring coordinate geometry, geometric p
In collections
Points, Lines, and Angles
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.620.0" app="classic" platform="w" id="C2CA6853-5F48-43C6-A23F-6E8CC03657AB" xsi:noNamespaceSchemaLocation="https://ggb123.cn/apps/xsd/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="800" height="600" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.125" orientation="1" />
</panes>
<views>
<view id="16" visible="false" inframe="false" stylebar="true" location="1,3,1" size="386" window="50,50,500,500" />
<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="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 , 538 | 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" size="0" window="100,100,600,400" />
<view id="2" visible="false" inframe="false" stylebar="true" location="3" size="380" tab="ALGEBRA" window="100,100,600,400" />
<view id="32" visible="false" inframe="false" stylebar="true" location="1" size="22" 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="4097" visible="false" inframe="false" stylebar="true" location="1" size="468" window="100,100,700,550" />
<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="1" visible="true" inframe="false" stylebar="false" location="" size="598" window="100,100,600,400" />
</views>
<toolbar show="false" 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="false" cmd="true" top="false" />
<dockBar show="false" east="false" />
</perspective>
</perspectives>
<labelingStyle val="3"/>
<font size="24"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="798" height="598"/>
<coordSystem xZero="85.72094915236445" yZero="171.04860316914517" scale="52.35392092054204" yscale="52.35392092054349"/>
<evSettings axes="false" grid="false" gridIsBold="false" pointCapturing="2" 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="11" 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="1"/>
<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="m">
<value val="8"/>
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelOffset x="-9" y="-1"/>
<labelMode val="3"/>
<slider min="2" max="8" absoluteScreenLocation="true" width="200" x="30" y="50" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
<caption val="改变列数"/>
</element>
<element type="numeric" label="n">
<value val="6"/>
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelOffset x="-10" y="6"/>
<labelMode val="3"/>
<slider min="2" max="8" absoluteScreenLocation="true" width="200" x="30" y="90" fixed="false" horizontal="true" showAlgebra="true"/>
<lineStyle thickness="10" type="0" typeHidden="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
<caption val="改变行数"/>
</element>
<command name="Random">
<input a0="0" a1="m - 1"/>
<output a0="a"/>
</command>
<element type="numeric" label="a">
<value val="2"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="Random">
<input a0="0" a1="1 - n"/>
<output a0="b"/>
</command>
<element type="numeric" label="b">
<value val="-3"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<element type="numeric" label="F9">
<value val="NaN"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<animation speed="1" type="0" playing="false"/>
<auxiliary val="true"/>
</element>
<command name="Random">
<input a0="0" a1="m - 1"/>
<output a0="c"/>
</command>
<element type="numeric" label="c">
<value val="5"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="Random">
<input a0="0" a1="1 - n"/>
<output a0="d"/>
</command>
<element type="numeric" label="d">
<value val="-4"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<element type="boolean" label="t">
<value val="false"/>
<show object="true" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelOffset x="339" y="13"/>
<labelMode val="3"/>
<checkbox fixed="true"/>
<caption val="显示格点方格"/>
</element>
<element type="point" label="A">
<show object="true" label="true" ev="8"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="1"/>
<labelOffset x="-41" y="21"/>
<labelMode val="3"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="0" y="-1" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<caption val="$%n$"/>
</element>
<element type="point" label="B">
<show object="true" label="true" ev="8"/>
<objColor r="77" g="77" b="255" alpha="0"/>
<layer val="1"/>
<labelOffset x="-1" y="53"/>
<labelMode val="3"/>
<animation step="0.1" speed="1" type="1" playing="false"/>
<coords x="3" y="0" z="1"/>
<pointSize val="5"/>
<pointStyle val="0"/>
<caption val="$%n$"/>
</element>
<command name="Segment">
<input a0="A" a1="B"/>
<output a0="g"/>
</command>
<element type="segment" label="g">
<show object="true" label="false" ev="8"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<coords x="-1" y="3" z="3"/>
<lineStyle thickness="10" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<expression label="C" exp="(a, b)" type="point" />
<element type="point" label="C">
<show object="true" label="true" ev="8"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelOffset x="5" y="39"/>
<labelMode val="3"/>
<selectionAllowed val="false"/>
<coords x="2" y="-3" z="1"/>
<pointSize val="4"/>
<pointStyle val="0"/>
<caption val="$%n$"/>
</element>
<expression label="D" exp="(c, d)" type="point" />
<element type="point" label="D">
<show object="true" label="true" ev="8"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelOffset x="-39" y="50"/>
<labelMode val="3"/>
<selectionAllowed val="false"/>
<coords x="5" y="-4" z="1"/>
<pointSize val="4"/>
<pointStyle val="0"/>
<caption val="$%n$"/>
</element>
<command name="If">
<input a0="y(B) > y(A)" a1="{Polygon[A, (x(B), y(A)), B, (x(A), y(B))]}" a2="{Polygon[A, (x(B), y(A)), B, (x(A), y(B))]}"/>
<output a0="l4"/>
</command>
<element type="list" label="l4">
<show object="true" label="false" ev="8"/>
<condition showObject="t"/>
<objColor r="0" g="0" b="255" alpha="0.5"/>
<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>
<command name="If">
<input a0="b > d" a1="{Polygon[C, (x(D), y(C)), D, (x(C), y(D))]}" a2="{Polygon[C, (x(C), y(D)), D, (x(D), y(C))]}"/>
<output a0="l5"/>
</command>
<element type="list" label="l5">
<show object="true" label="false" ev="8"/>
<condition showObject="t"/>
<objColor r="204" g="0" b="0" alpha="0.25"/>
<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>
<command name="Segment">
<input a0="C" a1="D"/>
<output a0="f"/>
</command>
<element type="segment" label="f">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="1"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<coords x="1" y="3" z="7"/>
<lineStyle thickness="10" type="0" typeHidden="1" opacity="178"/>
<outlyingIntersections val="false"/>
<keepTypeOnTransform val="true"/>
</element>
<command name="Sequence">
<input a0="Segment[(0, (-i)), (m, (-i))]" a1="i" a2="0" a3="n"/>
<output a0="l2"/>
</command>
<element type="list" label="l2">
<show object="true" label="false" ev="8"/>
<objColor r="0" g="100" 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>
<command name="Sequence">
<input a0="Segment[(i, 0), (i, (-n))]" a1="i" a2="0" a3="m"/>
<output a0="l3"/>
</command>
<element type="list" label="l3">
<show object="true" label="false" ev="8"/>
<objColor r="0" g="100" 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>
<command name="Angle">
<input a0="Line[A, B]" a1="Line[C, D]"/>
<output a0="α"/>
</command>
<element type="angle" label="α">
<angleStyle val="1"/>
<value val="5.639684198386302"/>
<show object="false" label="true" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<lineStyle thickness="5" type="0" typeHidden="2" opacity="178"/>
<arcSize val="30"/>
</element>
<expression label="text2" exp=""直线AB、CD的夹角为" + (LaTeX[α]) + """ />
<element type="text" label="text2">
<show object="true" label="false" ev="40"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<isLaTeX val="true"/>
<font serif="true" sizeM="1" size="0" style="0"/>
<absoluteScreenLocation x="341" y="56"/>
</element>
<expression label="p" exp="round(random())" />
<element type="numeric" label="p">
<value val="0"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<element type="button" label="button2">
<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="42" y="115"/>
<labelMode val="3"/>
<animation step="1" speed="1" type="0" playing="false"/>
<auxiliary val="true"/>
<ggbscript val="UpdateConstruction()"/>
<font serif="false" sizeM="2" size="24" style="0"/>
<caption val="点绿色文本生成CD,再调整AB使它所在的直线与CD平行或垂直"/>
</element>
</construction>
</geogebra>